Skip to content

Commit

Permalink
Unique coverage file names
Browse files Browse the repository at this point in the history
Signed-off-by: Tyler Smalley <tyler.smalley@elastic.co>
  • Loading branch information
Tyler Smalley committed Dec 23, 2020
1 parent 9c44d09 commit 5070786
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .ci/teamcity/tests/jest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ source "$(dirname "${0}")/../util.sh"
export JOB=kibana-jest

checks-reporter-with-killswitch "Jest Unit Tests" \
node scripts/jest --ci --verbose --maxWorkers=10 --coverage --coverageReporters json
node scripts/jest --ci --verbose --maxWorkers=10 --coverage
2 changes: 1 addition & 1 deletion .ci/teamcity/tests/jest_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ source "$(dirname "${0}")/../util.sh"
export JOB=kibana-jest-integration

checks-reporter-with-killswitch "Jest Integration Tests" \
node --expose-gc scripts/jest_integration --logHeapUsage --ci --verbose --coverage --coverageReporters json
node --expose-gc scripts/jest_integration --logHeapUsage --ci --verbose --coverage
6 changes: 4 additions & 2 deletions jest.config.integration.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,15 @@ module.exports = {
testPathIgnorePatterns: preset.testPathIgnorePatterns.filter(
(pattern) => !pattern.includes('integration_tests')
),
setupFilesAfterEnv: ['<rootDir>/packages/kbn-test/target/jest/setup/after_env.integration.js'],
reporters: [
'default',
[
'<rootDir>/packages/kbn-test/target/jest/junit_reporter',
{ reportName: 'Jest Integration Tests' },
],
],
setupFilesAfterEnv: ['<rootDir>/packages/kbn-test/target/jest/setup/after_env.integration.js'],
coverageDirectory: '<rootDir>/target/jest-coverage/jest_integration',
coverageReporters: !!process.env.CI
? [['json', { file: 'jest-integration.json' }]]
: ['html', 'text'],
};
2 changes: 1 addition & 1 deletion packages/kbn-test/jest-preset.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ module.exports = {
coveragePathIgnorePatterns: ['/node_modules/', '.*\\.d\\.ts'],

// A list of reporter names that Jest uses when writing coverage reports
coverageReporters: ['html', 'text'],
coverageReporters: !!process.env.CI ? [['json', { file: 'jest.json' }]] : ['html', 'text'],

// An array of file extensions your modules use
moduleFileExtensions: ['js', 'mjs', 'json', 'ts', 'tsx', 'node'],
Expand Down
2 changes: 1 addition & 1 deletion test/scripts/test/jest_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Jest Integration Tests" \
node --expose-gc scripts/jest_integration --logHeapUsage --ci --verbose --coverage --coverageReporters json
node --expose-gc scripts/jest_integration --logHeapUsage --ci --verbose --coverage
2 changes: 1 addition & 1 deletion test/scripts/test/jest_unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
source src/dev/ci_setup/setup_env.sh

checks-reporter-with-killswitch "Jest Unit Tests" \
node scripts/jest --ci --verbose --maxWorkers=10 --coverage --coverageReporters json
node scripts/jest --ci --verbose --maxWorkers=10 --coverage

0 comments on commit 5070786

Please sign in to comment.