We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vue3+jest
stages: - pages pages: stage: pages script: - npm install - npm run test - mkdir .public - cp -r coverage/* .public - rm -rf public - mv .public public artifacts: paths: - public when: always reports: junit: - junit.xml cobertura: coverage/cobertura-coverage.xml tags: - some-runner
注:
pages
npm run test
"test": "jest --config ./jest.config.js --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false"
module.exports = { moduleFileExtensions: [ 'js', 'ts', 'json', 'vue', 'tsx' ], transform: { '^.+\\.ts$': 'ts-jest', '^.+\\.vue$': 'vue-jest', '^.+\\.tsx$': 'vue-jest', "^.+\\.js$": "<rootDir>/node_modules/babel-jest", }, modulePaths: ["src"], moduleDirectories: ["node_modules"], moduleNameMapper: { '^@/(.*)$': '<rootDir>/src/$1' }, collectCoverageFrom: [ "src/**/*.{js,ts,tsx}", "!<rootDir>/node_modules/" ], coverageReporters: ["html", "text", "text-summary", "cobertura"], }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
一、技术栈
二、结果:
三、文件配置:
注:
pages
,否则无法生成page 链接。npm run test
的脚本为:"test": "jest --config ./jest.config.js --collectCoverage --coverageDirectory=\"./coverage\" --ci --reporters=default --reporters=jest-junit --watchAll=false"
四、Gitlab设置:
测试覆盖率badge
The text was updated successfully, but these errors were encountered: