From 50766ccfc01e3df98058364e02b779bc857eaeb5 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Mon, 13 Sep 2021 09:36:18 +0200 Subject: [PATCH] chore: supress experimental warnings in tests --- e2e/__tests__/nativeEsm.test.ts | 4 ++-- e2e/__tests__/nativeEsmTypescript.test.ts | 2 +- e2e/__tests__/resolveConditions.test.ts | 2 +- e2e/__tests__/transform.test.ts | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/e2e/__tests__/nativeEsm.test.ts b/e2e/__tests__/nativeEsm.test.ts index 9aa963af31c7..1a3a7adb63ce 100644 --- a/e2e/__tests__/nativeEsm.test.ts +++ b/e2e/__tests__/nativeEsm.test.ts @@ -24,7 +24,7 @@ test('test config is without transform', () => { onNodeVersions('^12.16.0 || >=13.7.0', () => { test('runs test with native ESM', () => { const {exitCode, stderr, stdout} = runJest(DIR, ['native-esm.test.js'], { - nodeOptions: '--experimental-vm-modules', + nodeOptions: '--experimental-vm-modules --no-warnings', }); const {summary} = extractSummary(stderr); @@ -41,7 +41,7 @@ onNodeVersions('>=14.3.0', () => { const {exitCode, stderr, stdout} = runJest( DIR, ['native-esm.tla.test.js'], - {nodeOptions: '--experimental-vm-modules'}, + {nodeOptions: '--experimental-vm-modules --no-warnings'}, ); const {summary} = extractSummary(stderr); diff --git a/e2e/__tests__/nativeEsmTypescript.test.ts b/e2e/__tests__/nativeEsmTypescript.test.ts index afec843cce91..d8ed0b7d59e4 100644 --- a/e2e/__tests__/nativeEsmTypescript.test.ts +++ b/e2e/__tests__/nativeEsmTypescript.test.ts @@ -15,7 +15,7 @@ const DIR = resolve(__dirname, '../native-esm-typescript'); onNodeVersions('^12.16.0 || >=13.7.0', () => { test('runs TS test with native ESM', () => { const {exitCode, json} = runJest(DIR, [], { - nodeOptions: '--experimental-vm-modules', + nodeOptions: '--experimental-vm-modules --no-warnings', }); expect(exitCode).toBe(0); diff --git a/e2e/__tests__/resolveConditions.test.ts b/e2e/__tests__/resolveConditions.test.ts index 01b43d6ea0e4..db9336320675 100644 --- a/e2e/__tests__/resolveConditions.test.ts +++ b/e2e/__tests__/resolveConditions.test.ts @@ -22,7 +22,7 @@ onNodeVersions('^12.16.0 || >=13.7.0', () => { // run multiple times to ensure there are no caching errors for (let i = 0; i < 5; i++) { const {exitCode} = runJest(dir, [], { - nodeOptions: '--experimental-vm-modules', + nodeOptions: '--experimental-vm-modules --no-warnings', }); try { expect(exitCode).toBe(0); diff --git a/e2e/__tests__/transform.test.ts b/e2e/__tests__/transform.test.ts index 51a5d255f227..72bd1a4510df 100644 --- a/e2e/__tests__/transform.test.ts +++ b/e2e/__tests__/transform.test.ts @@ -294,7 +294,7 @@ onNodeVersions('^12.17.0 || >=13.2.0', () => { it('should transform with transformer with only async transforms', () => { const {json, stderr} = runWithJson(dir, ['--no-cache'], { - nodeOptions: '--experimental-vm-modules', + nodeOptions: '--experimental-vm-modules --no-warnings', }); expect(stderr).toMatch(/PASS/); expect(json.success).toBe(true); @@ -311,7 +311,7 @@ onNodeVersions('^12.17.0 || >=13.2.0', () => { it("should use babel-jest's async transforms", () => { const {json, stderr} = runWithJson(dir, ['--no-cache'], { - nodeOptions: '--experimental-vm-modules', + nodeOptions: '--experimental-vm-modules --no-warnings', }); expect(stderr).toMatch(/PASS/); expect(json.success).toBe(true); @@ -323,7 +323,7 @@ onNodeVersions('^12.17.0 || >=13.2.0', () => { const dir = path.resolve(__dirname, '../transform/transform-esm-runner'); test('runs test with native ESM', () => { const {json, stderr} = runWithJson(dir, ['--no-cache'], { - nodeOptions: '--experimental-vm-modules', + nodeOptions: '--experimental-vm-modules --no-warnings', }); expect(stderr).toMatch(/PASS/); @@ -339,7 +339,7 @@ onNodeVersions('^12.17.0 || >=13.2.0', () => { ); test('runs test with native ESM', () => { const {json, stderr} = runWithJson(dir, ['--no-cache'], { - nodeOptions: '--experimental-vm-modules', + nodeOptions: '--experimental-vm-modules --no-warnings', }); expect(stderr).toMatch(/PASS/);