mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-12 21:23:45 +01:00
* [notifications] adopt strict zod types and extend test coverage * [notifications] validate expires date via schema GitOrigin-RevId: 25dee0578ec443447e4c38a50a7e6c8b44831fe7
32 lines
936 B
JavaScript
32 lines
936 B
JavaScript
const { defineConfig } = require('vitest/config')
|
|
|
|
let reporterOptions = {}
|
|
if (process.env.CI) {
|
|
reporterOptions = {
|
|
reporters: [
|
|
'default',
|
|
[
|
|
'junit',
|
|
{
|
|
classnameTemplate: `Acceptance tests.{filename}`,
|
|
},
|
|
],
|
|
],
|
|
outputFile: 'reports/junit-vitest-acceptance.xml',
|
|
}
|
|
}
|
|
module.exports = defineConfig({
|
|
test: {
|
|
include: ['test/acceptance/js/**/*.test.{js,ts}'],
|
|
isolate: false,
|
|
// Acceptance files share a single mongo instance and each runs the
|
|
// migration bootstrap in its own `beforeAll` (see MongoHelper.ts).
|
|
// Running files in parallel workers races two bootstrap runs against
|
|
// the same "create the migrations collection" migration. Force
|
|
// sequential file execution so only one bootstrap runs at a time.
|
|
fileParallelism: false,
|
|
testNamePattern: process.env.TEST_NAME_PATTERN || undefined,
|
|
...reporterOptions,
|
|
},
|
|
})
|