diff --git a/src/extensions/__tests__/extension-discovery.test.ts b/src/extensions/__tests__/extension-discovery.test.ts index 0e72cf16fb..0317319329 100644 --- a/src/extensions/__tests__/extension-discovery.test.ts +++ b/src/extensions/__tests__/extension-discovery.test.ts @@ -18,7 +18,7 @@ const mockedWatch = watch as jest.MockedFunction; describe("ExtensionDiscovery", () => { it("emits add for added extension", async done => { - globalThis.__non_webpack_require__.mockImplementationOnce(() => ({ + globalThis.__non_webpack_require__.mockImplementation(() => ({ name: "my-extension" })); let addHandler: (filePath: string) => void; @@ -61,9 +61,6 @@ describe("ExtensionDiscovery", () => { }); 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; const mockWatchInstance: any = {