Skip to content

Commit

Permalink
chore: faster jest tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicosantangelo committed Oct 22, 2021
1 parent 6310f25 commit aaf2d8f
Show file tree
Hide file tree
Showing 3 changed files with 137 additions and 8 deletions.
9 changes: 9 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
globals: {
'ts-jest': {
isolatedModules: true
},
},
preset: 'ts-jest',
testEnvironment: 'node',
maxWorkers: 4,
transform: {
"^.+\\.(t|j)sx?$": "@swc/jest"
},
testMatch: [
'<rootDir>/src/**/__tests__/**/*.[jt]s?(x)',
'<rootDir>/src/**/?(*.)+(spec|test).[jt]s?(x)',
Expand Down
134 changes: 126 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@
"web3x": "^4.0.6"
},
"devDependencies": {
"@swc/core": "^1.2.102",
"@swc/jest": "^0.2.5",
"@types/isomorphic-fetch": "0.0.35",
"@types/jest": "^27.0.1",
"@types/node": "^14.14.28",
Expand Down

0 comments on commit aaf2d8f

Please sign in to comment.