-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(tests): Convert jest config to js
Which seems to speed up the tests execution. hyperfine --warmup 5 --prepare "nx reset && nx clear-cache" \ --runs 100 "nx run-many -t lint" Time (mean ± σ): 1.417s ± 0.053s [User: 0.887s, System: 0.113s] Range (min … max): 1.368s … 1.775s 100 runs hyperfine --warmup 5 --prepare "nx reset && nx clear-cache" \ --runs 100 "nx run-many -t build" Time (mean ± σ): 2.110s ± 0.021s [User: 2.571s, System: 0.216s] Range (min … max): 2.078s … 2.193s 100 runs hyperfine --warmup 5 --prepare "nx reset && nx clear-cache" \ --runs 100 "nx run-many -t test" Time (mean ± σ): 1.493s ± 0.010s [User: 0.787s, System: 0.134s] Range (min … max): 1.460s … 1.540s 100 runs
- Loading branch information
1 parent
7978236
commit e9515ca
Showing
6 changed files
with
34 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
let jestConfigObject = { | ||
displayName: 'app', | ||
preset: '../../jest.preset.js', | ||
testEnvironment: 'node', | ||
transform: { | ||
'^.+\\.[tj]s$': ['ts-jest', { tsconfig: '<rootDir>/tsconfig.spec.json' }] | ||
}, | ||
moduleFileExtensions: ['ts', 'js', 'html'], | ||
coverageDirectory: '../../coverage/apps/app' | ||
} | ||
|
||
if (process.env.NODE_ENV === 'CI' || process.env.CI === 'true') { | ||
jestConfigObject.transform = { | ||
'^.+\\.[tj]s$': [ | ||
'ts-jest', | ||
{ | ||
tsconfig: '<rootDir>/tsconfig.spec.json', | ||
isolatedModules: true, | ||
diagnostics: false | ||
} | ||
] | ||
} | ||
} | ||
|
||
module.exports = jestConfigObject |
This file was deleted.
Oops, something went wrong.
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,7 @@ | ||
process.env.TZ = 'UTC' | ||
|
||
const { getJestProjectsAsync } = require('@nx/jest') | ||
|
||
module.exports = { | ||
projects: await getJestProjectsAsync() | ||
} |
This file was deleted.
Oops, something went wrong.