-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(e2e): remove
onNodeVersions
function
Since we support only Node 16+, we can safely remove this function
- Loading branch information
Showing
5 changed files
with
52 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,12 @@ | ||
import { json as runWithJson, onNodeVersions } from '../run-jest' | ||
import { json as runWithJson } from '../run-jest' | ||
|
||
const DIR = 'extend-ts-jest' | ||
|
||
// Only need to test in ESM because ESM makes `this` context become `undefined` | ||
onNodeVersions('>=14.15.0', () => { | ||
test(`successfully runs the tests inside ${DIR}`, () => { | ||
const { json } = runWithJson(DIR, undefined, { | ||
nodeOptions: '--experimental-vm-modules --no-warnings', | ||
}) | ||
|
||
expect(json.success).toBe(true) | ||
expect(json.numTotalTestSuites).toBe(1) | ||
test(`successfully runs the tests inside ${DIR}`, () => { | ||
const { json } = runWithJson(DIR, undefined, { | ||
nodeOptions: '--experimental-vm-modules --no-warnings', | ||
}) | ||
|
||
expect(json.success).toBe(true) | ||
expect(json.numTotalTestSuites).toBe(1) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
import { onNodeVersions, json as runWithJson } from '../run-jest' | ||
import { json as runWithJson } from '../run-jest' | ||
|
||
// The versions where vm.Module exists and commonjs with "exports" is not broken | ||
onNodeVersions('>=14.15.0', () => { | ||
test('runs TS test with native ESM', () => { | ||
const { exitCode, json } = runWithJson('native-esm-ts', [], { | ||
nodeOptions: '--experimental-vm-modules --no-warnings', | ||
}) | ||
|
||
expect(exitCode).toBe(0) | ||
expect(json.numTotalTests).toBe(4) | ||
expect(json.numPassedTests).toBe(4) | ||
test('runs TS test with native ESM', () => { | ||
const { exitCode, json } = runWithJson('native-esm-ts', [], { | ||
nodeOptions: '--experimental-vm-modules --no-warnings', | ||
}) | ||
|
||
expect(exitCode).toBe(0) | ||
expect(json.numTotalTests).toBe(4) | ||
expect(json.numPassedTests).toBe(4) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters