test: bump up jest to v27 that introduces new defaults (#315)

The jest-circus is now default runner, no need to depend on it explicitly.
The testEnvironment also changed its default to "node".
Also types/jest is now needless, we can use jest/globals instead.
https://jestjs.io/blog/2021/05/25/jest-27
This commit is contained in:
Kengo TODA 2021-07-19 21:36:00 +08:00 committed by GitHub
parent b4f07da866
commit 6182022b1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 1218 additions and 3573 deletions

View File

@ -2,6 +2,7 @@ import {wait} from '../src/wait'
import * as process from 'process'
import * as cp from 'child_process'
import * as path from 'path'
import {expect, test} from '@jest/globals'
test('throws invalid number', async () => {
const input = parseInt('foo', 10)

View File

@ -1,9 +1,7 @@
module.exports = {
clearMocks: true,
moduleFileExtensions: ['js', 'ts'],
testEnvironment: 'node',
testMatch: ['**/*.test.ts'],
testRunner: 'jest-circus/runner',
transform: {
'^.+\\.ts$': 'ts-jest'
},

4782
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -28,18 +28,16 @@
"@actions/core": "^1.2.6"
},
"devDependencies": {
"@types/jest": "^26.0.15",
"@types/node": "^14.14.9",
"@typescript-eslint/parser": "^4.8.1",
"@vercel/ncc": "^0.25.1",
"eslint": "^7.17.0",
"eslint-plugin-github": "^4.1.1",
"eslint-plugin-jest": "^24.1.3",
"jest": "^26.6.3",
"jest-circus": "^26.6.3",
"jest": "^27.0.6",
"js-yaml": "^3.14.0",
"prettier": "2.2.1",
"ts-jest": "^26.4.4",
"ts-jest": "^27.0.3",
"typescript": "^4.1.3"
}
}