-
Notifications
You must be signed in to change notification settings - Fork 108
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
chai-as-promised@7 with Karma: reserved word 'let' #207
Comments
So chai cannot be upgraded until Karma uses the not-yet-released Phantom 2.5? |
Did you read the section I linked?
|
So, the solution is to add to the karma config object, a rule inside the webpack field module.rules making the babel-loader process with the test: and a preprocessors field entry for the same thing: |
In my case I don't have control over the webpack config or most of the pipeline. I ended up reverting to 6.0.0 until phantomjs fully supports es6/2015 |
If you want more detail on how to do this with Karma Webpack and PhantomJS 5 checkout my comment on the Vue.js issue: vuejs-templates/webpack#646 (comment) |
@haraldrudell i have added your advised configuration in my karma.conf.js, but it still not work, with the same error Could you post your solutions please? Thanks in advance |
I am not sure if there is a transpile required or a refrain from fancy new constructs.
Here is the error message:
PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
SyntaxError: Use of reserved word 'let' in strict mode
at node_modules/chai-as-promised/lib/chai-as-promised.js:3
affected version: chai-as-promised@7.0.0
Get-around:
npm install chai@3 chai-as-promised@5
-> 3.5.0 + 5.3.0
The text was updated successfully, but these errors were encountered: