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:
parent
b4f07da866
commit
6182022b1c
|
@ -2,6 +2,7 @@ import {wait} from '../src/wait'
|
||||||
import * as process from 'process'
|
import * as process from 'process'
|
||||||
import * as cp from 'child_process'
|
import * as cp from 'child_process'
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
|
import {expect, test} from '@jest/globals'
|
||||||
|
|
||||||
test('throws invalid number', async () => {
|
test('throws invalid number', async () => {
|
||||||
const input = parseInt('foo', 10)
|
const input = parseInt('foo', 10)
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
clearMocks: true,
|
clearMocks: true,
|
||||||
moduleFileExtensions: ['js', 'ts'],
|
moduleFileExtensions: ['js', 'ts'],
|
||||||
testEnvironment: 'node',
|
|
||||||
testMatch: ['**/*.test.ts'],
|
testMatch: ['**/*.test.ts'],
|
||||||
testRunner: 'jest-circus/runner',
|
|
||||||
transform: {
|
transform: {
|
||||||
'^.+\\.ts$': 'ts-jest'
|
'^.+\\.ts$': 'ts-jest'
|
||||||
},
|
},
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -28,18 +28,16 @@
|
||||||
"@actions/core": "^1.2.6"
|
"@actions/core": "^1.2.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^26.0.15",
|
|
||||||
"@types/node": "^14.14.9",
|
"@types/node": "^14.14.9",
|
||||||
"@typescript-eslint/parser": "^4.8.1",
|
"@typescript-eslint/parser": "^4.8.1",
|
||||||
"@vercel/ncc": "^0.25.1",
|
"@vercel/ncc": "^0.25.1",
|
||||||
"eslint": "^7.17.0",
|
"eslint": "^7.17.0",
|
||||||
"eslint-plugin-github": "^4.1.1",
|
"eslint-plugin-github": "^4.1.1",
|
||||||
"eslint-plugin-jest": "^24.1.3",
|
"eslint-plugin-jest": "^24.1.3",
|
||||||
"jest": "^26.6.3",
|
"jest": "^27.0.6",
|
||||||
"jest-circus": "^26.6.3",
|
|
||||||
"js-yaml": "^3.14.0",
|
"js-yaml": "^3.14.0",
|
||||||
"prettier": "2.2.1",
|
"prettier": "2.2.1",
|
||||||
"ts-jest": "^26.4.4",
|
"ts-jest": "^27.0.3",
|
||||||
"typescript": "^4.1.3"
|
"typescript": "^4.1.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue