This repository has been archived by the owner on Mar 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: seperate jest into two test runs (#92)
- coverage is unreliable when projects use different tsconfig - split jest into two tests, server + client - seperate npm runs - seperate coverage output and github action Contributes to: #91 Signed-off-by: Nic Townsend <nictownsend@uk.ibm.com>
- Loading branch information
1 parent
1bf97c4
commit 1f62510
Showing
16 changed files
with
4,992 additions
and
3,018 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright Strimzi authors. | ||
* License: Apache License 2.0 (see the file LICENSE or http://apache.org/licenses/LICENSE-2.0.html). | ||
*/ | ||
const merge = require('lodash.merge'); | ||
const { pathsToModuleNameMapper } = require('ts-jest/utils'); | ||
const { jestModuleMapper } = require('../utils/tooling/aliasHelper'); | ||
const { compilerOptions } = require('./tsconfig.json'); | ||
const commonConfig = require('../test_common/jest.common.config'); | ||
|
||
const config = { | ||
setupFilesAfterEnv: ['<rootDir>/../test_common/jest_rtl_setup.ts'], | ||
testMatch: ['**/*.(spec|steps).[jt]s?(x)'], | ||
coverageDirectory: '<rootDir>/../coverage/client', | ||
moduleNameMapper: { | ||
...pathsToModuleNameMapper(compilerOptions.paths), | ||
...jestModuleMapper, | ||
}, | ||
testEnvironment: 'jsdom', | ||
collectCoverageFrom: [ | ||
'**/*.{js,ts,jsx,tsx}', | ||
'!**/index.{js,ts,jsx,tsx}', | ||
'!**/*.steps.*', | ||
'!**/*.d.ts', | ||
'!jest.config.js', | ||
// Wrapper around graphql - not something we need/wish to test | ||
'!Bootstrap/GraphQLClient/**', | ||
], | ||
}; | ||
|
||
module.exports = merge({}, commonConfig, config); |
Oops, something went wrong.