Skip to content

Commit

Permalink
resolve-dependencies test: replace normalize with TestUtils.makeProje…
Browse files Browse the repository at this point in the history
…ctConfig
  • Loading branch information
jeysal committed Feb 18, 2019
1 parent 00cc191 commit b60516f
Showing 1 changed file with 8 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
*/
'use strict';

import {tmpdir} from 'os';
import path from 'path';
import {Config} from '@jest/types';
// @ts-ignore
import {normalize} from 'jest-config';
import {buildSnapshotResolver} from 'jest-snapshot';
import {makeProjectConfig} from '../../../../TestUtils';

import DependencyResolver from '../index';

Expand All @@ -28,13 +28,12 @@ const filter = (path: Config.Path) =>

beforeEach(() => {
Runtime = require('jest-runtime');
config = normalize(
{
rootDir: '.',
roots: ['./packages/jest-resolve-dependencies'],
},
{},
).options;
config = makeProjectConfig({
cacheDirectory: path.resolve(tmpdir(), 'jest-resolve-dependencies-test'),
moduleDirectories: ['node_modules'],
rootDir: '.',
roots: ['./packages/jest-resolve-dependencies'],
});
return Runtime.createContext(config, {maxWorkers}).then((hasteMap: any) => {
dependencyResolver = new DependencyResolver(
hasteMap.resolver,
Expand Down

0 comments on commit b60516f

Please sign in to comment.