Fix tests.

Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This commit is contained in:
Panu Horsmalahti committed 2020-12-09 11:54:09 +02:00
1 parent 4f676d4e86
commit 38acae76d0
1 file changed
+1 -4
@@ -18,7 +18,7 @@ const mockedWatch = watch as jest.MockedFunction<typeof watch>;
describe("ExtensionDiscovery", () => { describe("ExtensionDiscovery", () => {
it("emits add for added extension", async done => { it("emits add for added extension", async done => {
globalThis.__non_webpack_require__.mockImplementationOnce(() => ({ globalThis.__non_webpack_require__.mockImplementation(() => ({
name: "my-extension" name: "my-extension"
})); }));
let addHandler: (filePath: string) => void; let addHandler: (filePath: string) => void;
@@ -61,9 +61,6 @@ describe("ExtensionDiscovery", () => {
}); });
it("doesn't emit add for added file under extension", async done => { it("doesn't emit add for added file under extension", async done => {
globalThis.__non_webpack_require__.mockImplementationOnce(() => ({
name: "my-extension"
}));
let addHandler: (filePath: string) => void; let addHandler: (filePath: string) => void;
const mockWatchInstance: any = { const mockWatchInstance: any = {