diff --git a/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js b/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js index 3e3dd10de3e2..9f79d123aef4 100644 --- a/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js +++ b/e2e/babel-plugin-jest-hoist/__tests__/integration.test.js @@ -34,6 +34,10 @@ let e; jest.unmock('../__test_modules__/e'); })(); +// Variable names prefixed with `mock` (ignore case) should not throw as out-of-scope +const MockMethods = () => {}; +jest.mock('../__test_modules__/f', () => MockMethods); + jest.mock('../__test_modules__/f', () => { if (!global.CALLS) { global.CALLS = 0; @@ -73,10 +77,6 @@ jest.dontMock('../__test_modules__/Mocked'); const myObject = {mock: () => {}}; myObject.mock('apple', 27); -// Variable names prefixed with `mock` (ignore case) should not throw as out-of-scope -const MockMethods = () => {}; -jest.mock('../__test_modules__/f', () => MockMethods); - describe('babel-plugin-jest-hoist', () => { it('does not throw during transform', () => { const object = {};