Skip to content

Commit

Permalink
fix esm can not get cjs named export problem
Browse files Browse the repository at this point in the history
  • Loading branch information
WeiAnAn committed Mar 28, 2021
1 parent ae4f650 commit 6344e43
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
4 changes: 3 additions & 1 deletion e2e/esm-global-setup/setup.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import crypto from 'crypto';
import os from 'os';
import path from 'path';
import fs from 'graceful-fs';
import {createDirectory} from 'jest-util';
import jestUtil from 'jest-util';

const {createDirectory} = jestUtil;

const DIR = path.join(os.tmpdir(), 'jest-esm-global-setup');

Expand Down
4 changes: 3 additions & 1 deletion e2e/esm-global-teardown/teardown.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import crypto from 'crypto';
import os from 'os';
import path from 'path';
import fs from 'graceful-fs';
import {createDirectory} from 'jest-util';
import jestUtil from 'jest-util';

const {createDirectory} = jestUtil;

const DIR = path.join(os.tmpdir(), 'jest-esm-global-teardown');

Expand Down
4 changes: 3 additions & 1 deletion e2e/test-environment-esm/TestEnvironment.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
import os from 'os';
import fs from 'graceful-fs';
import JSDOMEnvironment from 'jest-environment-jsdom';
import {createDirectory} from 'jest-util';
import jestUtil from 'jest-util';

const {createDirectory} = jestUtil;

const DIR = os.tmpdir() + '/jest-test-environment-esm';

Expand Down
4 changes: 3 additions & 1 deletion e2e/transform/transform-esm-runner/runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
*/

import throat from 'throat';
import {createEmptyTestResult} from '@jest/test-result';
import testResult from '@jest/test-result';

const {createEmptyTestResult} = testResult;

export default class BaseTestRunner {
constructor(globalConfig, context) {
Expand Down
4 changes: 3 additions & 1 deletion e2e/transform/transform-esm-testrunner/test-runner.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import {createEmptyTestResult} from '@jest/test-result';
import testResult from '@jest/test-result';

const {createEmptyTestResult} = testResult;

export default async function testRunner(
globalConfig,
Expand Down

0 comments on commit 6344e43

Please sign in to comment.