Skip to content

Commit bb59fc2

Browse files
authored
Merge pull request #2 from SimenB/inline-require
Inline require
2 parents 5c83993 + 0c71336 commit bb59fc2

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

ā€Ž.babelrcā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"transform-es2015-parameters",
77
"transform-async-to-generator",
88
"transform-strict-mode",
9-
["transform-inline-imports-commonjs", {"allowTopLevelThis": true}]
9+
["transform-inline-imports-commonjs", {"allowTopLevelThis": true, "excludeModules": ["jest-matcher-utils"]}]
1010
],
1111
"retainLines": true
1212
}

ā€Žpackages/jest-matchers/src/index.jsā€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ import type {
1818
ThrowingMatcherFn,
1919
PromiseMatcherFn,
2020
} from 'types/Matchers';
21-
// jest-matcher-utils needs to be eagerly evaluated
22-
const utils = require('jest-matcher-utils');
21+
22+
import utils from 'jest-matcher-utils';
2323
import matchers from './matchers';
2424
import spyMatchers from './spyMatchers';
2525
import toThrowMatchers from './toThrowMatchers';

0 commit comments

Comments
Ā (0)
⚔