diff --git a/jest.config.js b/jest.config.js index ec9282ea..4acff3b1 100644 --- a/jest.config.js +++ b/jest.config.js @@ -6,5 +6,6 @@ export default { }, moduleNameMapper: { '@fetch-mock/core': '/packages/core/dist/cjs/index.js', + '(.+)\\.js': '$1', }, }; diff --git a/packages/jest/src/index.ts b/packages/jest/src/index.ts index 1b95a531..ddda7c9e 100644 --- a/packages/jest/src/index.ts +++ b/packages/jest/src/index.ts @@ -3,7 +3,7 @@ import { defaultFetchMockConfig, RemoveRouteOptions, } from 'fetch-mock'; -import './jest-extensions'; +import './jest-extensions.js'; import type { Jest } from '@jest/environment'; type MockResetOptions = { diff --git a/packages/vitest/src/index.ts b/packages/vitest/src/index.ts index 9ef977f5..0c779968 100644 --- a/packages/vitest/src/index.ts +++ b/packages/vitest/src/index.ts @@ -4,7 +4,7 @@ import { defaultFetchMockConfig, RemoveRouteOptions, } from 'fetch-mock'; -import './vitest-extensions'; +import './vitest-extensions.js'; type MockResetOptions = { includeSticky: boolean;