Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Mar 14, 2021
1 parent 8608fc1 commit d052f81
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions packages/babel-jest/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,20 +147,22 @@ async function loadBabelOptionsAsync(
return addIstanbulInstrumentation(options, jestTransformOptions);
}

const createTransformer: CreateTransformer = (userOptions = {}) => {
const createTransformer: CreateTransformer = userOptions => {
const inputOptions = userOptions ?? {};

const options = {
...userOptions,
...inputOptions,
caller: {
name: 'babel-jest',
supportsDynamicImport: false,
supportsExportNamespaceFrom: false,
supportsStaticESM: false,
supportsTopLevelAwait: false,
...userOptions.caller,
...inputOptions.caller,
},
compact: false,
plugins: userOptions.plugins ?? [],
presets: (userOptions.presets ?? []).concat(jestPresetPath),
plugins: inputOptions.plugins ?? [],
presets: (inputOptions.presets ?? []).concat(jestPresetPath),
sourceMaps: 'both',
} as const;

Expand Down

0 comments on commit d052f81

Please sign in to comment.