Skip to content

Commit

Permalink
Fix broken integration test due to proper hoist ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
tgriesser committed Sep 21, 2020
1 parent eada567 commit ce68bb2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions e2e/babel-plugin-jest-hoist/__tests__/integration.test.js
Expand Up @@ -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;
Expand Down Expand Up @@ -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 = {};
Expand Down

0 comments on commit ce68bb2

Please sign in to comment.