Skip to content
This repository was archived by the owner on Jun 22, 2022. It is now read-only.

Commit dc22bb7

Browse files
committed
Fix for jest@26
1 parent 1d8adb6 commit dc22bb7

File tree

3 files changed

+2149
-1162
lines changed

3 files changed

+2149
-1162
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@
4343
"@types/babel__generator": "^7.0.1",
4444
"@types/babel__template": "^7.0.1",
4545
"@types/babel__traverse": "^7.0.1",
46-
"@types/jest": "^23.3.9",
46+
"@types/jest": "^25.2.1",
4747
"@types/node": "^10.12.9",
4848
"babel-core": "^7.0.0-bridge.0",
4949
"babel-jest": "^23.6.0",
5050
"babel-plugin-emotion": "^9.2.11",
5151
"del-cli": "^1.1.0",
52-
"jest": "^23.6.0",
52+
"jest": "^26.0.1",
5353
"npm-run-all": "^4.1.3",
5454
"typescript": "^3.1.6",
5555
"typescript-snapshots-plugin": "^1.5.3"

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export function mockExternalComponents(componentPath: string, testPath?: string)
6565
if (flattenMocks[mockPath] && flattenMocks[mockPath].length) {
6666
// const newPath = path.join(mainDirPath, mock.path);
6767
jest.doMock(newPath, () => {
68-
const actual = require.requireActual(newPath);
68+
const actual = jest.requireActual(newPath);
6969
let mockedModule = { ...actual };
7070
Object.defineProperty(mockedModule, "__esModule", { value: true });
7171
const mocks = flattenMocks[mockPath];

0 commit comments

Comments
 (0)