Skip to content

Commit

Permalink
chore: remove node version pinning from CI (#11866)
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Sep 16, 2021
1 parent 2f135d3 commit f4188de
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .circleci/config.yml
Expand Up @@ -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
3 changes: 1 addition & 2 deletions .github/workflows/nodejs.yml
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions packages/jest-config/package.json
Expand Up @@ -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"
Expand Down
9 changes: 6 additions & 3 deletions packages/jest-config/src/__tests__/normalize.test.ts
Expand Up @@ -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';
Expand Down Expand Up @@ -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(
{
Expand All @@ -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 () => {
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Expand Up @@ -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
Expand Down

0 comments on commit f4188de

Please sign in to comment.