diff --git a/.circleci/config.yml b/.circleci/config.yml index e6e5330970b9..9c2ed2bf9a6b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -70,6 +70,5 @@ workflows: partial: true matrix: parameters: - # https://github.com/nodejs/node/issues/40030 - node-version: ['10', '12', '15', '16.8'] + node-version: ['10', '12', '15', '16'] - test-jest-jasmine diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 85098a759c65..6d5266607e9f 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -69,8 +69,7 @@ jobs: strategy: fail-fast: false matrix: - # https://github.com/nodejs/node/issues/40030 - node-version: [10.x, 12.x, 14.x, 15.x, 16.8] + node-version: [10.x, 12.x, 14.x, 15.x, 16.x] os: [ubuntu-latest, macOS-latest, windows-latest] runs-on: ${{ matrix.os }} needs: prepare-yarn-cache diff --git a/packages/jest-config/package.json b/packages/jest-config/package.json index 447dbd491a14..1f49025e7f91 100644 --- a/packages/jest-config/package.json +++ b/packages/jest-config/package.json @@ -51,6 +51,7 @@ "@types/is-ci": "^3.0.0", "@types/micromatch": "^4.0.1", "jest-snapshot-serializer-raw": "^1.1.0", + "semver": "^7.3.5", "strip-ansi": "^6.0.0", "ts-node": "^9.0.0", "typescript": "^4.0.3" diff --git a/packages/jest-config/src/__tests__/normalize.test.ts b/packages/jest-config/src/__tests__/normalize.test.ts index 924391a49335..f2fe92b9743b 100644 --- a/packages/jest-config/src/__tests__/normalize.test.ts +++ b/packages/jest-config/src/__tests__/normalize.test.ts @@ -9,6 +9,7 @@ import {createHash} from 'crypto'; import path from 'path'; import {wrap} from 'jest-snapshot-serializer-raw'; +import semver = require('semver'); import stripAnsi from 'strip-ansi'; import type {Config} from '@jest/types'; import {escapeStrForRegex} from 'jest-regex-util'; @@ -1130,6 +1131,10 @@ describe('preset', () => { {virtual: true}, ); + const errorMessage = semver.satisfies(process.versions.node, '>=16.9.1') + ? "TypeError: Cannot read properties of undefined (reading 'call')" + : /TypeError: Cannot read property 'call' of undefined[\s\S]* at /; + await expect( normalize( { @@ -1138,9 +1143,7 @@ describe('preset', () => { }, {} as Config.Argv, ), - ).rejects.toThrowError( - /TypeError: Cannot read property 'call' of undefined[\s\S]* at /, - ); + ).rejects.toThrowError(errorMessage); }); test('works with "react-native"', async () => { diff --git a/yarn.lock b/yarn.lock index 6b59588125ba..44245a8324ad 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12681,6 +12681,7 @@ fsevents@^1.2.7: jest-validate: ^27.2.0 micromatch: ^4.0.4 pretty-format: ^27.2.0 + semver: ^7.3.5 strip-ansi: ^6.0.0 ts-node: ^9.0.0 typescript: ^4.0.3