Skip to content

Commit

Permalink
tweak normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Jun 26, 2019
1 parent 409bcac commit bf426a7
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions packages/jest-config/src/normalize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -619,20 +619,20 @@ export default function normalize(
const transform = oldOptions[key];
value =
transform &&
Object.keys(transform).map(regex =>
[
Object.keys(transform).map(regex => {
const transformElement = transform[regex];
return [
regex,
resolve(newOptions.resolver, {
filePath: Array.isArray(transform[regex])
? transform[regex][0]
: transform[regex],
filePath: Array.isArray(transformElement)
? transformElement[0]
: transformElement,
key,
rootDir: options.rootDir,
}),
].concat(
Array.isArray(transform[regex]) ? [transform[regex][1]] : [],
),
);
...(Array.isArray(transformElement) ? [transformElement[1]] : []),
];
});
break;
case 'coveragePathIgnorePatterns':
case 'modulePathIgnorePatterns':
Expand Down

0 comments on commit bf426a7

Please sign in to comment.