-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught Error: Unexpected reserved word #7
Comments
If you run mocha from the command line does it work? Unexpected reserved word points at using es6 features that aren't available in the atom context without a transpiler in play. You can use the |
Yes, from the command line it works fine. You can reproduce this problem by running atom in the "todomvc" example dir from redux: https://github.com/rackt/redux/tree/master/examples/todomvc |
Ah, it works using That npm test command does a few things including passing the compiler and require parameters. This extension requires parameters passed through mocha.opts .... if these same parameters were present i imagine it would work. With straight I'm just responding via phone at the airport.... will look into this more in depth when I reach my destination. |
Ah yes, here's the full stack running just mocha -- they do indeed use import so it totally dies in the absence of the babel.
One thing though, the npm test command also sets up NODE_ENV to be testing which cannot be done in mocha.opts (see mochajs/mocha#185) There's not much the extension can do here aside from executing what is in the npm test command. For what it's worth, the way in which the todomvs sets the environment variable is not done in a platform indepdendent way - even if I passed whatrever it was to the shell module it would have failed on my system. Most of the options here around fixing the unexpected token can be fixed by passing the compile and require parameters via mocha.opts.... and there's not much the plugin can do around their reliance on NODE_ENV being testing. |
just try and run tests in a mocha project.
Atom Version: 1.3.1
System: Mac OS X 10.11.2
Thrown From: mocha-runner package, v1.1.8
Stack Trace
Uncaught Error: Unexpected reserved word
Commands
Config
{ "core": {} }
Installed Packages
The text was updated successfully, but these errors were encountered: