2022-10-08 19:22:44 +08:00
|
|
|
// to run tests with ES6 module, node must run with "--experimental-vm-modules", or see Makefile's "test-frontend" for reference
|
2021-04-08 18:41:57 +08:00
|
|
|
export default {
|
2021-08-17 13:32:48 +08:00
|
|
|
rootDir: 'web_src',
|
2021-10-19 15:23:58 +08:00
|
|
|
setupFilesAfterEnv: ['jest-extended/all'],
|
2022-08-23 20:58:04 +08:00
|
|
|
testEnvironment: 'jest-environment-jsdom',
|
2021-08-17 13:32:48 +08:00
|
|
|
testMatch: ['<rootDir>/**/*.test.js'],
|
2021-04-08 18:41:57 +08:00
|
|
|
testTimeout: 20000,
|
2021-11-16 16:16:05 +08:00
|
|
|
transform: {
|
2022-05-11 03:44:36 +08:00
|
|
|
'\\.svg$': '<rootDir>/js/testUtils/jestRawLoader.js',
|
2021-11-16 16:16:05 +08:00
|
|
|
},
|
2022-10-08 19:22:44 +08:00
|
|
|
setupFiles: [
|
|
|
|
'./js/testUtils/jestSetup.js', // prepare global variables used by our code (eg: window.config)
|
|
|
|
],
|
2021-04-08 18:41:57 +08:00
|
|
|
verbose: false,
|
|
|
|
};
|