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.rootPath": "backend",
|
||||||
"jest.nodeEnv": {
|
"jest.nodeEnv": {
|
||||||
"NODE_OPTIONS": "--experimental-vm-modules"
|
"NODE_OPTIONS": "--experimental-vm-modules"
|
||||||
},
|
},
|
||||||
"jest.runMode": "on-demand"
|
"jest.runMode": "on-demand"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,16 +15,19 @@ const jestConfig = {
|
|||||||
'^(\\.{1,2}/.*)\\.js$': '$1' // Allow importing js files and resolving to ts files
|
'^(\\.{1,2}/.*)\\.js$': '$1' // Allow importing js files and resolving to ts files
|
||||||
},
|
},
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.tsx?$': ['ts-jest', {
|
'^.+\\.tsx?$': [
|
||||||
tsconfig: {
|
'ts-jest',
|
||||||
module: 'esnext',
|
{
|
||||||
moduleResolution: 'node16',
|
tsconfig: {
|
||||||
esModuleInterop: true,
|
module: 'esnext',
|
||||||
allowSyntheticDefaultImports: true,
|
moduleResolution: 'node16',
|
||||||
isolatedModules: true
|
esModuleInterop: true,
|
||||||
},
|
allowSyntheticDefaultImports: true,
|
||||||
useESM: 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