Fix vitest junit coverage runs
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
c35a066368
commit
280b255529
|
@ -134,7 +134,7 @@ vitest:
|
|||
before_script:
|
||||
- yarn --cwd "js" install --frozen-lockfile
|
||||
script:
|
||||
- yarn --cwd "js" run coverage --reporter=junit --outputFile.junit=./js/junit.xml
|
||||
- yarn --cwd "js" run coverage --reporter=default --reporter=junit --outputFile.junit=./js/junit.xml
|
||||
artifacts:
|
||||
when: always
|
||||
paths:
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
module.exports = {
|
||||
preset: "@vue/cli-plugin-unit-jest/presets/typescript-and-babel",
|
||||
collectCoverage: true,
|
||||
collectCoverageFrom: [
|
||||
"**/*.{vue,ts}",
|
||||
"!**/node_modules/**",
|
||||
"!get_union_json.ts",
|
||||
],
|
||||
coverageReporters: ["html", "text", "text-summary"],
|
||||
reporters: ["default", "jest-junit"],
|
||||
// The following should fix the issue with svgs and ?inline loader (see Logo.vue), but doesn't work
|
||||
//
|
||||
// transform: {
|
||||
// "^.+\\.svg$": "<rootDir>/tests/unit/svgTransform.js",
|
||||
// },
|
||||
// moduleNameMapper: {
|
||||
// "^@/(.*svg)(\\?inline)$": "<rootDir>/src/$1",
|
||||
// "^@/(.*)$": "<rootDir>/src/$1",
|
||||
// },
|
||||
};
|
|
@ -74,6 +74,9 @@ export default defineConfig(({ command }) => {
|
|||
"@": path.resolve(__dirname, "./src"),
|
||||
},
|
||||
},
|
||||
coverage: {
|
||||
reporter: ["text", "json", "html"],
|
||||
},
|
||||
setupFiles: path.resolve(__dirname, "./tests/unit/setup.ts"),
|
||||
include: [path.resolve(__dirname, "./tests/unit/specs/**/*.spec.ts")],
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue