Skip to content

Commit 0e5b363

Browse files
authored
chore: reduce reliance on esModuleInterop (#8842)
1 parent d69f8d3 commit 0e5b363

File tree

168 files changed

+522
-607
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+522
-607
lines changed

e2e/Utils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
*
77
*/
88

9-
import fs from 'fs';
10-
import path from 'path';
9+
import * as fs from 'fs';
10+
import * as path from 'path';
1111
import {Config} from '@jest/types';
1212

1313
import {sync as spawnSync, ExecaReturns} from 'execa';

e2e/__tests__/__snapshots__/moduleNameMapper.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ FAIL __tests__/index.js
3030
12 | module.exports = () => 'test';
3131
13 |
3232
33-
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:501:17)
33+
at createNoMappedModuleFoundError (../../packages/jest-resolve/build/index.js:493:17)
3434
at Object.require (index.js:10:1)
3535
`;

e2e/__tests__/__snapshots__/resolveNoFileExtensions.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,6 @@ FAIL __tests__/test.js
3333
| ^
3434
9 |
3535
36-
at Resolver.resolveModule (../../packages/jest-resolve/build/index.js:259:17)
36+
at Resolver.resolveModule (../../packages/jest-resolve/build/index.js:255:17)
3737
at Object.require (index.js:8:18)
3838
`;

e2e/__tests__/__snapshots__/transform.test.ts.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ FAIL __tests__/ignoredFile.test.js
66
77
babel-jest: Babel ignores __tests__/ignoredFile.test.js - make sure to include the file in Jest's transformIgnorePatterns as well.
88
9-
at loadBabelConfig (../../../packages/babel-jest/build/index.js:132:13)
9+
at loadBabelConfig (../../../packages/babel-jest/build/index.js:157:13)
1010
`;
1111

1212
exports[`babel-jest instruments only specific files and collects coverage 1`] = `

e2e/__tests__/asyncRegenerator.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import path from 'path';
8+
import * as path from 'path';
99
import {run} from '../Utils';
1010
import {json as runWithJson} from '../runJest';
1111

e2e/__tests__/babelPluginJestHoist.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import path from 'path';
8+
import * as path from 'path';
99
import {json as runWithJson} from '../runJest';
1010
import {run} from '../Utils';
1111

e2e/__tests__/chaiAssertionLibrary.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import path from 'path';
8+
import * as path from 'path';
99
import {wrap} from 'jest-snapshot-serializer-raw';
1010
import runJest from '../runJest';
1111
import {extractSummary, run} from '../Utils';

e2e/__tests__/clearCache.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import fs from 'fs';
9-
import os from 'os';
10-
import path from 'path';
8+
import * as fs from 'fs';
9+
import {tmpdir} from 'os';
10+
import * as path from 'path';
1111
import runJest from '../runJest';
1212

13-
const CACHE = path.resolve(os.tmpdir(), 'clear-cache-directory');
13+
const CACHE = path.resolve(tmpdir(), 'clear-cache-directory');
1414

1515
describe('jest --clearCache', () => {
1616
test('normal run results in cache directory being written', () => {

e2e/__tests__/cliHandlesExactFilenames.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import path from 'path';
8+
import * as path from 'path';
99
import {wrap} from 'jest-snapshot-serializer-raw';
1010
import {skipSuiteOnWindows} from '@jest/test-utils';
1111
import {cleanup, extractSummary, writeFiles} from '../Utils';

e2e/__tests__/console.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* LICENSE file in the root directory of this source tree.
66
*/
77

8-
import path from 'path';
8+
import * as path from 'path';
99
import {wrap} from 'jest-snapshot-serializer-raw';
1010
import {extractSummary, run} from '../Utils';
1111
import runJest from '../runJest';

0 commit comments

Comments
 (0)