-
-
Save Globegitter/ee46154b9a1b7506af19 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // index.js | |
| require('babel/register')({ only: /tests/ }); | |
| require('./tests'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // lib/index.js | |
| console.log('' + this); | |
| var promise = new Promise(function (resolve, reject) { | |
| resolve(0); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // tests/index.js | |
| require('../lib'); | |
| class Foo { | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I have code above (with
npm i babelof course) and it vianode index.jsonv0.10.36it all works fine even though it does not supportPromise.If I now comment out
// require('babel/register')({ only: /tests/ });as well as the//class Foo { }and runnode index.jsagain it throws an error as it should:So there does seem to be something up.