Skip to content

Commit f5e8736

Browse files
committed
wip
1 parent e8a6ef6 commit f5e8736

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

jest.config.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ const tsConfigPaths = {
55
'@tests/*': [ 'tests/*' ],
66
};
77

8+
const currentDir = new URL('.', import.meta.url).pathname;
9+
810
/** @type {import('@jest/types').Config.InitialOptions } */
911
export default {
1012
preset: 'ts-jest/presets/js-with-ts',
@@ -13,7 +15,7 @@ export default {
1315
testRegex: '(/__test__/.*|/tests/.*|(\\.|/)(test|spec))\\.[tj]sx?$',
1416
testPathIgnorePatterns: [ '/node_modules/', '/dist/' ],
1517
moduleFileExtensions: [ 'ts', 'tsx', 'js', 'jsx', 'json' ],
16-
moduleNameMapper: pathsToModuleNameMapper(tsConfigPaths, { prefix: `${__dirname}/` }),
18+
moduleNameMapper: pathsToModuleNameMapper(tsConfigPaths, { prefix: currentDir + '/' }),
1719

1820
coverageDirectory: './coverage',
1921
coverageReporters: [ 'html', 'text' ],

0 commit comments

Comments
 (0)