mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix download test
Signed-off-by: Alex Andreev <alex.andreev.email@gmail.com>
This commit is contained in:
parent
9da3d06ce2
commit
6a10d9a379
@ -25,7 +25,7 @@ describe("BundledExtensionUpdater", () => {
|
|||||||
it("Should download file from server", async () => {
|
it("Should download file from server", async () => {
|
||||||
mockFs(mockOpts);
|
mockFs(mockOpts);
|
||||||
|
|
||||||
const scope = nock("http://my-example-url.com")
|
nock("http://my-example-url.com")
|
||||||
.get("/node-menu-0.0.1.tgz")
|
.get("/node-menu-0.0.1.tgz")
|
||||||
.replyWithFile(200, `./some-user-data-directory/some-file.tgz`, {
|
.replyWithFile(200, `./some-user-data-directory/some-file.tgz`, {
|
||||||
"Content-Type": "application/tar",
|
"Content-Type": "application/tar",
|
||||||
@ -37,7 +37,8 @@ describe("BundledExtensionUpdater", () => {
|
|||||||
downloadUrl: "http://my-example-url.com/node-menu-0.0.1.tgz",
|
downloadUrl: "http://my-example-url.com/node-menu-0.0.1.tgz",
|
||||||
}, "./extension-updates").update();
|
}, "./extension-updates").update();
|
||||||
|
|
||||||
const exist = await fs.promises.access(mockFs.bypass(() => "./extension-updates/node-menu-0.0.1.tgz"), fs.constants.F_OK);
|
|
||||||
|
const exist = fs.existsSync("./extension-updates/node-menu-0.0.1.tgz");
|
||||||
|
|
||||||
expect(exist).toBeTruthy();
|
expect(exist).toBeTruthy();
|
||||||
});
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user