Skip to content

Commit

Permalink
Fix dependency clash test modified in jestjs#6104
Browse files Browse the repository at this point in the history
  • Loading branch information
rubennorte committed Oct 18, 2018
1 parent 8a7b4a9 commit 64eb8d8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion e2e/__tests__/dependency_clash.test.js
Expand Up @@ -24,6 +24,9 @@ skipSuiteOnWindows();

// doing test in a temp directory because we don't want jest node_modules affect it
const tempDir = path.resolve(os.tmpdir(), 'clashing-dependencies-test');
const hasteImplModulePath = path.resolve(
'./packages/jest-haste-map/src/__tests__/haste_impl.js',
);
const thirdPartyDir = path.resolve(tempDir, 'third-party');

beforeEach(() => {
Expand Down Expand Up @@ -59,7 +62,7 @@ test('fails with syntax error on flow types', () => {
}
`,
'__tests__/test.js': `
const invariant = require('../invariant');
const invariant = require('invariant');
test('haii', () => expect(invariant(false, 'haii')).toBe('haii'));
`,
'invariant.js': `/**
Expand All @@ -69,6 +72,9 @@ test('fails with syntax error on flow types', () => {
module.exports = invariant;
`,
'jest.config.js': `module.exports = {
haste: {
hasteImplModulePath: '${hasteImplModulePath}',
},
transform: {'.*\\.js': './third-party/node_modules/babel-jest'},
};`,
});
Expand Down

0 comments on commit 64eb8d8

Please sign in to comment.