Update Jest configuration for integration tests and improve command line options
This commit is contained in:
parent
659cdcaf73
commit
21e939e09c
3
meet-ce/.vscode/settings.json
vendored
3
meet-ce/.vscode/settings.json
vendored
@ -1,8 +1,9 @@
|
||||
{
|
||||
"jest.jestCommandLine": "node --experimental-vm-modules ../../node_modules/.bin/jest",
|
||||
"jest.jestCommandLine": "node --experimental-vm-modules ../../node_modules/.bin/jest --config jest.integration.config.mjs",
|
||||
"jest.rootPath": "backend",
|
||||
"jest.nodeEnv": {
|
||||
"NODE_OPTIONS": "--experimental-vm-modules"
|
||||
},
|
||||
"jest.runMode": "on-demand"
|
||||
|
||||
}
|
||||
|
||||
@ -15,16 +15,19 @@ const jestConfig = {
|
||||
'^(\\.{1,2}/.*)\\.js$': '$1' // Allow importing js files and resolving to ts files
|
||||
},
|
||||
transform: {
|
||||
'^.+\\.tsx?$': ['ts-jest', {
|
||||
tsconfig: {
|
||||
module: 'esnext',
|
||||
moduleResolution: 'node16',
|
||||
esModuleInterop: true,
|
||||
allowSyntheticDefaultImports: true,
|
||||
isolatedModules: true
|
||||
},
|
||||
useESM: true
|
||||
}]
|
||||
'^.+\\.tsx?$': [
|
||||
'ts-jest',
|
||||
{
|
||||
tsconfig: {
|
||||
module: 'esnext',
|
||||
moduleResolution: 'node16',
|
||||
esModuleInterop: true,
|
||||
allowSyntheticDefaultImports: true,
|
||||
isolatedModules: true
|
||||
},
|
||||
useESM: true
|
||||
}
|
||||
]
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
12
meet-ce/backend/jest.integration.config.mjs
Normal file
12
meet-ce/backend/jest.integration.config.mjs
Normal file
@ -0,0 +1,12 @@
|
||||
import baseConfig from './jest.config.mjs';
|
||||
|
||||
const integrationConfig = {
|
||||
...baseConfig,
|
||||
|
||||
runInBand: true,
|
||||
forceExit: true,
|
||||
detectOpenHandles: true,
|
||||
testMatch: ['**/tests/integration/**/*.(spec|test).ts'],
|
||||
};
|
||||
|
||||
export default integrationConfig;
|
||||
Loading…
x
Reference in New Issue
Block a user