Skip to content

Commit

Permalink
Set compact to false to avoid Babel warnings on large files (Fixes #5703
Browse files Browse the repository at this point in the history
) (#5704)

* Set compact false for babel

* Push changelog update

* Add compact flag to babel-jest as well, fix lint errors

* Be consistent and set compact to false in both places
  • Loading branch information
christiango authored and cpojer committed Mar 3, 2018
1 parent 5fabc34 commit 1ab41c3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
([#5696](https://github.com/facebook/jest/pull/5696))
* `[expect]` Fix rejects.not matcher
([#5670](https://github.com/facebook/jest/pull/5670))
* `[jest-runtime]` Prevent Babel warnings on large files
([#5702](https://github.com/facebook/jest/pull/5702))

### Chore & Maintenance

Expand Down
1 change: 1 addition & 0 deletions packages/babel-jest/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const createTransformer = (options: any): Transformer => {
};

options = Object.assign({}, options, {
compact: false,
plugins: (options && options.plugins) || [],
presets: ((options && options.presets) || []).concat([jestPreset]),
sourceMaps: 'both',
Expand Down
1 change: 1 addition & 0 deletions packages/jest-runtime/src/script_transformer.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ export default class ScriptTransformer {
[
babelPluginIstanbul,
{
compact: false,
// files outside `cwd` will not be instrumented
cwd: this._config.rootDir,
exclude: [],
Expand Down

0 comments on commit 1ab41c3

Please sign in to comment.