Skip to content

Commit

Permalink
Merge pull request #861 from wheresrhys/rhys/fix-856
Browse files Browse the repository at this point in the history
fix: use file extension to avoid import errors for vitest and jest wrappers
  • Loading branch information
wheresrhys authored Oct 30, 2024
2 parents 59deb0c + 16e96a1 commit 17cdda0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ export default {
},
moduleNameMapper: {
'@fetch-mock/core': '<rootDir>/packages/core/dist/cjs/index.js',
'(.+)\\.js': '$1',
},
};
2 changes: 1 addition & 1 deletion packages/jest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
2 changes: 1 addition & 1 deletion packages/vitest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
defaultFetchMockConfig,
RemoveRouteOptions,
} from 'fetch-mock';
import './vitest-extensions';
import './vitest-extensions.js';

type MockResetOptions = {
includeSticky: boolean;
Expand Down

0 comments on commit 17cdda0

Please sign in to comment.