From c629a3f4f23edf02c71bad15b60a8f2dcce91021 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Wed, 9 Feb 2022 14:59:46 +0100 Subject: [PATCH] docs and e2e --- docs/Configuration.md | 2 +- docs/Puppeteer.md | 2 +- e2e/resolve-conditions/deno-env.js | 2 +- e2e/test-environment-async/TestEnvironment.js | 2 +- .../CircusAsyncHandleTestEventEnvironment.js | 2 +- e2e/test-environment-circus/CircusHandleTestEventEnvironment.js | 2 +- e2e/test-environment/DocblockPragmasEnvironment.js | 2 +- e2e/test-environment/EsmDefaultEnvironment.js | 2 +- examples/mongodb/mongo-environment.js | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index 7d6e47370040..5080992aed65 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -1103,7 +1103,7 @@ Example: ```js // my-custom-environment -const NodeEnvironment = require('jest-environment-node'); +const NodeEnvironment = require('jest-environment-node').default; class CustomEnvironment extends NodeEnvironment { constructor(config, context) { diff --git a/docs/Puppeteer.md b/docs/Puppeteer.md index 16ab669a9ab2..52ff00431a51 100644 --- a/docs/Puppeteer.md +++ b/docs/Puppeteer.md @@ -80,7 +80,7 @@ const {readFile} = require('fs').promises; const os = require('os'); const path = require('path'); const puppeteer = require('puppeteer'); -const NodeEnvironment = require('jest-environment-node'); +const NodeEnvironment = require('jest-environment-node').default; const DIR = path.join(os.tmpdir(), 'jest_puppeteer_global_setup'); diff --git a/e2e/resolve-conditions/deno-env.js b/e2e/resolve-conditions/deno-env.js index a0e81fbbb436..8468ad463dda 100644 --- a/e2e/resolve-conditions/deno-env.js +++ b/e2e/resolve-conditions/deno-env.js @@ -7,7 +7,7 @@ 'use strict'; -const NodeEnv = require('jest-environment-node'); +const NodeEnv = require('jest-environment-node').default; module.exports = class DenoEnvWithConditions extends NodeEnv { exportConditions() { diff --git a/e2e/test-environment-async/TestEnvironment.js b/e2e/test-environment-async/TestEnvironment.js index 62097b44e614..8908625da9a8 100644 --- a/e2e/test-environment-async/TestEnvironment.js +++ b/e2e/test-environment-async/TestEnvironment.js @@ -9,7 +9,7 @@ const fs = require('fs'); const os = require('os'); -const JSDOMEnvironment = require('jest-environment-jsdom'); +const JSDOMEnvironment = require('jest-environment-jsdom').default; const {createDirectory} = require('jest-util'); const DIR = os.tmpdir() + '/jest-test-environment'; diff --git a/e2e/test-environment-circus-async/CircusAsyncHandleTestEventEnvironment.js b/e2e/test-environment-circus-async/CircusAsyncHandleTestEventEnvironment.js index 52a121cdab4c..ba3a2672ccb3 100644 --- a/e2e/test-environment-circus-async/CircusAsyncHandleTestEventEnvironment.js +++ b/e2e/test-environment-circus-async/CircusAsyncHandleTestEventEnvironment.js @@ -7,7 +7,7 @@ 'use strict'; -const JSDOMEnvironment = require('jest-environment-jsdom'); +const JSDOMEnvironment = require('jest-environment-jsdom').default; const sleep = ms => new Promise(resolve => setTimeout(resolve, ms)); diff --git a/e2e/test-environment-circus/CircusHandleTestEventEnvironment.js b/e2e/test-environment-circus/CircusHandleTestEventEnvironment.js index 6bd6f2191adf..99f5a5699e14 100644 --- a/e2e/test-environment-circus/CircusHandleTestEventEnvironment.js +++ b/e2e/test-environment-circus/CircusHandleTestEventEnvironment.js @@ -7,7 +7,7 @@ 'use strict'; -const JSDOMEnvironment = require('jest-environment-jsdom'); +const JSDOMEnvironment = require('jest-environment-jsdom').default; class TestEnvironment extends JSDOMEnvironment { handleTestEvent(event) { diff --git a/e2e/test-environment/DocblockPragmasEnvironment.js b/e2e/test-environment/DocblockPragmasEnvironment.js index d32bbacba041..2f6b1329f4d2 100644 --- a/e2e/test-environment/DocblockPragmasEnvironment.js +++ b/e2e/test-environment/DocblockPragmasEnvironment.js @@ -7,7 +7,7 @@ 'use strict'; -const JSDOMEnvironment = require('jest-environment-jsdom'); +const JSDOMEnvironment = require('jest-environment-jsdom').default; class TestEnvironment extends JSDOMEnvironment { constructor(config, context) { diff --git a/e2e/test-environment/EsmDefaultEnvironment.js b/e2e/test-environment/EsmDefaultEnvironment.js index 6c3e9ad5b769..696b9722995e 100644 --- a/e2e/test-environment/EsmDefaultEnvironment.js +++ b/e2e/test-environment/EsmDefaultEnvironment.js @@ -8,7 +8,7 @@ exports.__esModule = true; -const NodeEnvironment = require('jest-environment-node'); +const NodeEnvironment = require('jest-environment-node').default; class Env extends NodeEnvironment { constructor(config, options) { diff --git a/examples/mongodb/mongo-environment.js b/examples/mongodb/mongo-environment.js index 7f4f8618eb19..60e5e8f14b72 100644 --- a/examples/mongodb/mongo-environment.js +++ b/examples/mongodb/mongo-environment.js @@ -1,5 +1,5 @@ // mongo-environment.js -const NodeEnvironment = require('jest-environment-node'); +const NodeEnvironment = require('jest-environment-node').default; const path = require('path');