mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-05 12:06:36 -05:00
* chore(deps): update jest monorepo to v29 * chore: install jest-environment-jsdom * chore: update snapshots * fix: update config to transform nanoid+uuid * chore: update babel's node target This does not seem strictly necessary, but is probably for the best. Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
26 lines
848 B
JavaScript
26 lines
848 B
JavaScript
module.exports = {
|
|
testPathIgnorePatterns: ['/node_modules/', 'api/'],
|
|
moduleNameMapper: {
|
|
'\\.(jpg|jpeg|png|svg|woff|woff2)$':
|
|
'<rootDir>/client/src/__mocks__/file-mock.ts',
|
|
// Plain CSS - match css files that don't end with
|
|
// '.module.css' https://regex101.com/r/VzwrKH/4
|
|
'^(?!.*\\.module\\.css$).*\\.css$':
|
|
'<rootDir>/client/src/__mocks__/style-mock.ts',
|
|
// CSS Modules - match files that end with 'module.css'
|
|
'\\.module\\.css$': 'identity-obj-proxy',
|
|
'^lodash-es$': 'lodash'
|
|
},
|
|
globals: {
|
|
__PATH_PREFIX__: ''
|
|
},
|
|
verbose: true,
|
|
transform: {
|
|
'^.+\\.[jt]sx?$': '<rootDir>/jest.transform.js'
|
|
},
|
|
roots: ['.', './client', './api-server'],
|
|
transformIgnorePatterns: ['node_modules/.pnpm/(?!(nanoid|uuid)@)'],
|
|
setupFilesAfterEnv: ['./jest.setup.js'],
|
|
testEnvironment: 'jsdom'
|
|
};
|