Unverified Commit c61f6c12 authored by Joe Haddad's avatar Joe Haddad Committed by GitHub

Test environment code should target Node (#8181)

parent 4850bd03
...@@ -69,9 +69,10 @@ module.exports = ( ...@@ -69,9 +69,10 @@ module.exports = (
...options['preset-env'], ...options['preset-env'],
} }
// When transpiling for the server, target the current Node version if not explicitly specified: // When transpiling for the server or tests, target the current Node version
// if not explicitly specified:
if ( if (
isServer && (isServer || isTest) &&
(!presetEnvConfig.targets || !('node' in presetEnvConfig.targets)) (!presetEnvConfig.targets || !('node' in presetEnvConfig.targets))
) { ) {
presetEnvConfig.targets = { presetEnvConfig.targets = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment