mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Fix tests on Windows.
Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
parent
d2c16ed389
commit
5449765548
@ -1,4 +1,5 @@
|
|||||||
import { watch } from "chokidar";
|
import { watch } from "chokidar";
|
||||||
|
import { join } from "path";
|
||||||
import { ExtensionDiscovery, InstalledExtension } from "../extension-discovery";
|
import { ExtensionDiscovery, InstalledExtension } from "../extension-discovery";
|
||||||
|
|
||||||
jest.mock("../../common/ipc");
|
jest.mock("../../common/ipc");
|
||||||
@ -56,7 +57,7 @@ describe("ExtensionDiscovery", () => {
|
|||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
addHandler(`${extensionDiscovery.localFolderPath}/my-extension/package.json`);
|
addHandler(join(extensionDiscovery.localFolderPath, "/my-extension/package.json"));
|
||||||
});
|
});
|
||||||
|
|
||||||
it("doesn't emit add for added file under extension", async done => {
|
it("doesn't emit add for added file under extension", async done => {
|
||||||
@ -89,7 +90,7 @@ describe("ExtensionDiscovery", () => {
|
|||||||
|
|
||||||
extensionDiscovery.events.on("add", onAdd);
|
extensionDiscovery.events.on("add", onAdd);
|
||||||
|
|
||||||
addHandler(`${extensionDiscovery.localFolderPath}/my-extension/node_modules/dep/package.json`);
|
addHandler(join(extensionDiscovery.localFolderPath, "/my-extension/node_modules/dep/package.json"));
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
expect(onAdd).not.toHaveBeenCalled();
|
expect(onAdd).not.toHaveBeenCalled();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user