Skip to content
New issue

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

chore(unit): fix re-add jest-silent-reporter to unit test CI output #24071

Merged
merged 7 commits into from
May 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,9 @@ aliases:
- <<: *attach_to_bootstrap
- run: yarn list react
- run:
command: node --max-old-space-size=2048 ./node_modules/.bin/jest -w 1 --ci --reporters=jest-junit
command: node --max-old-space-size=2048 ./node_modules/.bin/jest -w 1 --ci
environment:
GENERATE_JEST_REPORT: true
JEST_JUNIT_OUTPUT_DIR: ./test-results/jest-node/
JEST_JUNIT_OUTPUT_NAME: results.xml
- store_test_results:
Expand Down
14 changes: 3 additions & 11 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,11 @@ module.exports = {
"^highlight.js$": `<rootDir>/node_modules/highlight.js/lib/index.js`,
},
snapshotSerializers: [`jest-serializer-path`],
collectCoverage: useCoverage,
coverageReporters: [`json-summary`, `text`, `html`, `cobertura`],
coverageThreshold: {
global: {
lines: 45,
statements: 44,
functions: 42,
branches: 43,
},
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we weren't using them anyway and those were just failing because they tried to analyze fixtures - might be good idea to set them up properly with fixture ignore, but that's not in scope of this PR

collectCoverageFrom: coverageDirs,
reporters: process.env.CI
? [[`jest-silent-reporter`, { useDots: true }]]
? [[`jest-silent-reporter`, { useDots: true }]].concat(
useCoverage ? `jest-junit` : []
)
: [`default`].concat(useCoverage ? `jest-junit` : []),
testEnvironment: `jest-environment-jsdom-fourteen`,
moduleFileExtensions: [`js`, `jsx`, `ts`, `tsx`, `json`],
Expand Down