Skip to content

Commit

Permalink
Disable @babel/plugin-transform-block-scoping "throwIfClosureRequired…
Browse files Browse the repository at this point in the history
…" option for tests
  • Loading branch information
Brian Vaughn committed Aug 15, 2019
1 parent 41db902 commit 4c4f5fd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/jest/preprocessor.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ const babelOptions = {
require.resolve('@babel/plugin-transform-react-jsx-source'),

require.resolve('../babel/transform-prevent-infinite-loops'),

// This optimization is important for extremely performance-sensitive (e.g. React source).
// It's okay to disable it for tests.
[require.resolve('@babel/plugin-transform-block-scoping'), {throwIfClosureRequired: false}],
],
retainLines: true,
};
Expand Down

0 comments on commit 4c4f5fd

Please sign in to comment.