Skip to content

Commit

Permalink
test: fix cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jan 27, 2018
1 parent 9740778 commit 6148662
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion packages/jest-resolve/src/__tests__/resolve.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,27 @@ describe('getMockModule', () => {
describe('Resolver.getModulePaths() -> nodeModulesPaths()', () => {
let moduleMap;

beforeEach(() => {
beforeAll(() => {
jest.resetModules();
});

beforeEach(() => {
moduleMap = new ModuleMap({
duplicates: [],
map: [],
mocks: [],
});
});

afterEach(() => {
jest.resetModules();
});

afterAll(() => {
jest.unmock('path');
Resolver = require('../');
});

it('can resolve node modules relative to absolute paths in "moduleDirectories" on Windows platforms', () => {
jest.doMock('path', () => path.win32);
Resolver = require('../');
Expand Down

0 comments on commit 6148662

Please sign in to comment.