Skip to content

Commit

Permalink
Optionally enable external-helpers in tests (#12982)
Browse files Browse the repository at this point in the history
* Optionally enable external-helpers in tests

#12911 was a breaking change that now requires you to keep `babel-plugin-external-helpers` in your `package.json`. It'll will probably be unnoticeable for most, because another dependency could transitively depend on it, but AMP recently hit it when cleaning up our deps.

* Cast to boolean

* Fix package name
  • Loading branch information
jridgewell committed Mar 8, 2021
1 parent c702895 commit 49a9b70
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/babel-helper-fixtures/src/index.ts
Expand Up @@ -135,7 +135,9 @@ function pushTask(taskName, taskDir, suite, suiteName) {
? taskOpts.BABEL_8_BREAKING === false
: taskOpts.BABEL_8_BREAKING === true),
options: taskOpts,
externalHelpers: taskOpts.externalHelpers ?? true,
externalHelpers:
taskOpts.externalHelpers ??
!!tryResolve("@babel/plugin-external-helpers"),
validateLogs: taskOpts.validateLogs,
ignoreOutput: taskOpts.ignoreOutput,
stdout: { loc: stdoutLoc, code: readFile(stdoutLoc) },
Expand Down

0 comments on commit 49a9b70

Please sign in to comment.