mirror of
https://github.com/atom/atom.git
synced 2026-04-28 03:01:47 -04:00
Make invalid JS file fail Babel spec again
This change uses a different JavaScript syntax to cause the "when a .js file does not start with 'use babel'" spec to fail again after upgrading to Electron 3 / Node 10.3.0. The previous generator syntax seems to be supported in the version of V8 used by Node 10 so we now need to use the 'export default' syntax to trigger an error. I've verified that changing the first line of this file to 'use babel' causes the file to load successfully, so it seems this new syntax is effective to verify the desired behavior.
This commit is contained in:
committed by
David Wilson
parent
10dbd69db2
commit
8eccaf2d5d
2
spec/fixtures/babel/invalid.js
vendored
2
spec/fixtures/babel/invalid.js
vendored
@@ -1,3 +1,3 @@
|
||||
'use 6to6';
|
||||
|
||||
module.exports = async function* hello() {}
|
||||
export default 42;
|
||||
|
||||
Reference in New Issue
Block a user