Skip to content

Commit

Permalink
Use Object.assign() in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
rafeca committed Oct 16, 2018
1 parent 182c842 commit 4c3095b
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions packages/jest-runtime/src/__tests__/script_transformer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -511,17 +511,19 @@ describe('ScriptTransformer', () => {
});

it('does not reuse the in-memory cache between different projects', () => {
const scriptTransformer = new ScriptTransformer({
...config,
transform: [['^.+\\.js$', 'test_preprocessor']],
});
const scriptTransformer = new ScriptTransformer(
Object.assign({}, config, {
transform: [['^.+\\.js$', 'test_preprocessor']],
}),
);

scriptTransformer.transform('/fruits/banana.js', {});

const anotherScriptTransformer = new ScriptTransformer({
...config,
transform: [['^.+\\.js$', 'css-preprocessor']],
});
const anotherScriptTransformer = new ScriptTransformer(
Object.assign({}, config, {
transform: [['^.+\\.js$', 'css-preprocessor']],
}),
);

anotherScriptTransformer.transform('/fruits/banana.js', {});

Expand Down

0 comments on commit 4c3095b

Please sign in to comment.