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'], moduleFileExtensions: ['js', 'ts', 'json'],
testEnvironment: 'node', testEnvironment: 'node',
testMatch: ['**/*.test.ts'], testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: { transform: {
'^.+\\.ts$': 'ts-jest' '^.+\\.ts$': 'ts-jest'
}, },
verbose: true, verbose: true
setupFilesAfterEnv: ['./jest.setup.js']
} }

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

View File

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