Simplify Jest setup

- Remove explicit dependency on jest-circus: this is now the default runner
- Remove test timeout setting
- Remove @types/jest from explicit dependencies
This commit is contained in:
Daz DeBoer 2022-05-15 09:46:37 -06:00
parent 202e4e0271
commit f1c309a163
No known key found for this signature in database
GPG key ID: DD6B9F0B06683D5D
4 changed files with 5 additions and 8 deletions

View file

@ -3,10 +3,8 @@ module.exports = {
moduleFileExtensions: ['js', 'ts', 'json'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest'
},
verbose: true,
setupFilesAfterEnv: ['./jest.setup.js']
verbose: true
}

View file

@ -1 +0,0 @@
jest.setTimeout(10000) // in milliseconds

6
package-lock.json generated
View file

@ -20,7 +20,6 @@
"string-argv": "0.3.1"
},
"devDependencies": {
"@types/jest": "27.4.1",
"@types/node": "16.11.21",
"@types/unzipper": "0.10.5",
"@typescript-eslint/parser": "5.23.0",
@ -29,7 +28,6 @@
"eslint-plugin-github": "4.3.6",
"eslint-plugin-jest": "26.2.0",
"jest": "27.5.1",
"jest-circus": "27.5.1",
"js-yaml": "4.1.0",
"patch-package": "6.4.7",
"prettier": "2.6.2",
@ -1606,6 +1604,8 @@
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.1.tgz",
"integrity": "sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw==",
"dev": true,
"optional": true,
"peer": true,
"dependencies": {
"jest-matcher-utils": "^27.0.0",
"pretty-format": "^27.0.0"
@ -8401,6 +8401,8 @@
"resolved": "https://registry.npmjs.org/@types/jest/-/jest-27.4.1.tgz",
"integrity": "sha512-23iPJADSmicDVrWk+HT58LMJtzLAnB2AgIzplQuq/bSrGaxCrlvRFjGbXmamnnk/mAmCdLStiGqggu28ocUyiw==",
"dev": true,
"optional": true,
"peer": true,
"requires": {
"jest-matcher-utils": "^27.0.0",
"pretty-format": "^27.0.0"

View file

@ -34,7 +34,6 @@
"string-argv": "0.3.1"
},
"devDependencies": {
"@types/jest": "27.4.1",
"@types/node": "16.11.21",
"@types/unzipper": "0.10.5",
"@typescript-eslint/parser": "5.23.0",
@ -43,7 +42,6 @@
"eslint-plugin-github": "4.3.6",
"eslint-plugin-jest": "26.2.0",
"jest": "27.5.1",
"jest-circus": "27.5.1",
"js-yaml": "4.1.0",
"patch-package": "6.4.7",
"prettier": "2.6.2",