Skip to content

Commit 6538969

Browse files
committed
Fix test config (though tests still broken)
and also add moduleNameMappers.
1 parent a8182ff commit 6538969

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

jest.config.js renamed to jest.config.cjs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ const customJestConfig = {
88
moduleDirectories: ['node_modules', '<rootDir>/'],
99
testEnvironment: 'jest-environment-jsdom',
1010
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
11+
moduleNameMapper: {
12+
// Handle module aliases (this will be automatically configured for you soon)
13+
'^@components/(.*)$': '<rootDir>/components/$1',
14+
'^@pages/(.*)$': '<rootDir>/pages/$1',
15+
'^@lib/(.*)$': '<rootDir>/lib/$1',
16+
},
1117
}
1218

1319
module.exports = createJestConfig(customJestConfig)

0 commit comments

Comments
 (0)