Skip to content

Commit 2f135d3

Browse files
authored
chore: remove node 13 as condition in some tests (#11880)
1 parent d7f0975 commit 2f135d3

16 files changed

+33
-40
lines changed
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
// Jest Snapshot v1, https://goo.gl/fbAQLP
22

3-
exports[`on node >=14.3.0 supports top-level await 1`] = `
3+
exports[`on node >=12.16.0 runs test with native ESM 1`] = `
44
Test Suites: 1 passed, 1 total
5-
Tests: 1 passed, 1 total
5+
Tests: 21 passed, 21 total
66
Snapshots: 0 total
77
Time: <<REPLACED>>
8-
Ran all test suites matching /native-esm.tla.test.js/i.
8+
Ran all test suites matching /native-esm.test.js/i.
99
`;
1010
11-
exports[`on node ^12.16.0 || >=13.7.0 runs test with native ESM 1`] = `
11+
exports[`on node >=14.3.0 supports top-level await 1`] = `
1212
Test Suites: 1 passed, 1 total
13-
Tests: 21 passed, 21 total
13+
Tests: 1 passed, 1 total
1414
Snapshots: 0 total
1515
Time: <<REPLACED>>
16-
Ran all test suites matching /native-esm.test.js/i.
16+
Ran all test suites matching /native-esm.tla.test.js/i.
1717
`;

e2e/__tests__/customEsmTestSequencers.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {extractSummary} from '../Utils';
1111
import runJest from '../runJest';
1212
const dir = path.resolve(__dirname, '../custom-esm-test-sequencer');
1313

14-
onNodeVersions('^12.16.0 || >=13.7.0', () => {
14+
onNodeVersions('>=12.16.0', () => {
1515
test('run prioritySequence', () => {
1616
const result = runJest(dir, ['-i'], {
1717
nodeOptions: '--experimental-vm-modules --no-warnings',

e2e/__tests__/customReporters.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ describe('Custom Reporters Integration', () => {
161161
expect(exitCode).toBe(1);
162162
});
163163

164-
onNodeVersions('^12.17.0 || >=13.2.0', () => {
164+
onNodeVersions('>=12.17.0', () => {
165165
test('supports reporter written in ESM', () => {
166166
writeFiles(DIR, {
167167
'__tests__/test.test.js': `test('test', () => {});`,

e2e/__tests__/detectOpenHandles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ it('does not report crypto random data', () => {
8282
expect(textAfterTest).toBe('');
8383
});
8484

85-
onNodeVersions('>=11.10.0', () => {
85+
onNodeVersions('>=12', () => {
8686
it('does not report ELD histograms', () => {
8787
const {stderr} = runJest('detect-open-handles', [
8888
'histogram',
@@ -110,7 +110,7 @@ describe('notify', () => {
110110
});
111111
});
112112

113-
onNodeVersions('>=11', () => {
113+
onNodeVersions('>=12', () => {
114114
it('does not report timeouts using unref', () => {
115115
// The test here is basically that it exits cleanly without reporting anything (does not need `until`)
116116
const {stderr} = runJest('detect-open-handles', [

e2e/__tests__/esmConfigFile.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ test('reads config from cjs file', () => {
2020
});
2121
});
2222

23-
onNodeVersions('^12.17.0 || >=13.2.0', () => {
23+
onNodeVersions('>=12.17.0', () => {
2424
test('reads config from mjs file', () => {
2525
const {configs} = getConfig('esm-config/mjs', [], {
2626
skipPkgJsonCheck: true,

e2e/__tests__/globalSetup.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ test('properly handle rejections', () => {
197197
expect(stderr).toContain('reason: undefined');
198198
});
199199

200-
onNodeVersions('^12.17.0 || >=13.2.0', () => {
200+
onNodeVersions('>=12.17.0', () => {
201201
test('globalSetup works with ESM modules', () => {
202202
const {exitCode} = runJest('global-setup-esm', [`--no-cache`], {
203203
nodeOptions: '--experimental-vm-modules --no-warnings',

e2e/__tests__/globalTeardown.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ test('globalTeardown throws with named export', () => {
136136
);
137137
});
138138

139-
onNodeVersions('^12.17.0 || >=13.2.0', () => {
139+
onNodeVersions('>=12.17.0', () => {
140140
test('globalTeardown works with ESM modules', () => {
141141
const {exitCode} = runJest('global-teardown-esm', [`--no-cache`], {
142142
nodeOptions: '--experimental-vm-modules --no-warnings',

e2e/__tests__/nativeAsyncMock.test.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,6 @@ import runJest from '../runJest';
1212
const dir = path.resolve(__dirname, '..', 'native-async-mock');
1313

1414
test('mocks async functions', () => {
15-
if (process.versions.node < '7.6.0') {
16-
return;
17-
}
18-
1915
runYarnInstall(dir);
2016

2117
// --no-cache because babel can cache stuff and result in false green

e2e/__tests__/nativeEsm.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ test('test config is without transform', () => {
2121
});
2222

2323
// The versions where vm.Module exists and commonjs with "exports" is not broken
24-
onNodeVersions('^12.16.0 || >=13.7.0', () => {
24+
onNodeVersions('>=12.16.0', () => {
2525
test('runs test with native ESM', () => {
2626
const {exitCode, stderr, stdout} = runJest(DIR, ['native-esm.test.js'], {
2727
nodeOptions: '--experimental-vm-modules --no-warnings',

e2e/__tests__/nativeEsmTypescript.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import {json as runJest} from '../runJest';
1212
const DIR = resolve(__dirname, '../native-esm-typescript');
1313

1414
// The versions where vm.Module exists and commonjs with "exports" is not broken
15-
onNodeVersions('^12.16.0 || >=13.7.0', () => {
15+
onNodeVersions('>=12.16.0', () => {
1616
test('runs TS test with native ESM', () => {
1717
const {exitCode, json} = runJest(DIR, [], {
1818
nodeOptions: '--experimental-vm-modules --no-warnings',

0 commit comments

Comments
 (0)