test: generate JUnit reports for Jenkins
All checks were successful
THE-TIP-TOP-MULTIBRANCH/pipeline/head This commit looks good
All checks were successful
THE-TIP-TOP-MULTIBRANCH/pipeline/head This commit looks good
This commit is contained in:
@@ -1,26 +1,33 @@
|
||||
module.exports = {
|
||||
testEnvironment: "node",
|
||||
|
||||
// Dossier des tests
|
||||
testMatch: ["**/tests/**/*.test.js"],
|
||||
|
||||
// Nettoyage des mocks entre les tests
|
||||
clearMocks: true,
|
||||
|
||||
// Timeout (utile pour Prisma / DB)
|
||||
testTimeout: 10000,
|
||||
|
||||
// Affichage des logs de test
|
||||
verbose: true,
|
||||
verbose: true,
|
||||
|
||||
// Couverture de code (optionnel mais bon pour soutenance)
|
||||
collectCoverage: true,
|
||||
coverageDirectory: "coverage",
|
||||
|
||||
coverageReporters: [
|
||||
"text",
|
||||
"lcov",
|
||||
"html"
|
||||
],
|
||||
|
||||
// Fichiers à ignorer
|
||||
testPathIgnorePatterns: ["/node_modules/"],
|
||||
reporters: [
|
||||
"default",
|
||||
[
|
||||
"jest-junit",
|
||||
{
|
||||
outputDirectory: "./test-results",
|
||||
outputName: "junit.xml"
|
||||
}
|
||||
]
|
||||
],
|
||||
|
||||
// Configuration pour Jest avec Supertest
|
||||
//setupFilesAfterEnv: ["<rootDir>/tests/setup.js"]
|
||||
};
|
||||
testPathIgnorePatterns: ["/node_modules/"]
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user