mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Split tests into sequential and parallel projects
Sequential tests need to be run without parallelism because they rely on a database fixture that can have side effects. GitOrigin-RevId: b614cbe4dbaf2319e681d5607a0a64cbbed8c021
This commit is contained in:
@@ -17,13 +17,34 @@ if (process.env.CI && process.env.MOCHA_ROOT_SUITE_NAME) {
|
||||
}
|
||||
module.exports = defineConfig({
|
||||
test: {
|
||||
include: [
|
||||
'modules/*/test/unit/**/*.test.mjs',
|
||||
'test/unit/src/**/*.test.mjs',
|
||||
],
|
||||
setupFiles: ['./test/unit/vitest_bootstrap.mjs'],
|
||||
globals: true,
|
||||
isolate: false,
|
||||
projects: [
|
||||
{
|
||||
extends: true,
|
||||
test: {
|
||||
name: 'Parallel',
|
||||
include: [
|
||||
'modules/*/test/unit/**/*.test.mjs',
|
||||
'test/unit/src/**/*.test.mjs',
|
||||
],
|
||||
exclude: ['**/*.sequential.test.mjs'],
|
||||
fileParallelism: true,
|
||||
},
|
||||
},
|
||||
{
|
||||
extends: true,
|
||||
test: {
|
||||
name: 'Sequential',
|
||||
include: [
|
||||
'modules/*/test/unit/**/*.sequential.test.mjs',
|
||||
'test/unit/src/**/*.sequential.test.mjs',
|
||||
],
|
||||
fileParallelism: false,
|
||||
},
|
||||
},
|
||||
],
|
||||
...reporterOptions,
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user