Skip to content

Commit

Permalink
fix init test
Browse files Browse the repository at this point in the history
  • Loading branch information
thymikee committed Dec 15, 2018
1 parent 4eda413 commit 6a663d0
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions packages/jest-cli/src/lib/__tests__/init.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ import fs from 'fs';
import path from 'path';
import prompts from 'prompts';
import init from '../init';
import getCacheDirectory from '../../../../jest-config/build/getCacheDirectory';

jest.mock('prompts');
jest.mock('../../../../jest-config/build/getCacheDirectory');

// mocked to get the same snapshot on every machine
getCacheDirectory.mockReturnValue('/tmp/jest');
jest.mock('../../../../jest-config/build/getCacheDirectory', () => () =>
'/tmp/jest',
);

const resolveFromFixture = relativePath =>
path.resolve(__dirname, 'fixtures', relativePath);
Expand Down

0 comments on commit 6a663d0

Please sign in to comment.