-
Notifications
You must be signed in to change notification settings - Fork 47
Babel 6 Support #81
Comments
Hi @spudly |
It doesn't require much work I think to upgrade the version, but some tests could fail because of Babel known issues. (class properties are one of them for example) |
one issue I'm seeing is .babelrc presets flag blowing up. Thanks for your assistance and work! |
Trying to run tests and getting the next error
|
The presets warning is shown because isparta depends on [email protected], which doesn't have a |
testing my fork shortly. hopefully I'll have a PR for you before long |
eh.... it's building, but failing tests. feel free to take a look, hopefully my work can help you along. |
What are the errors? Did you try to remove the es6 classes tests? |
Hmm I just tried and got this error, but no idea where it comes from.
|
Ok, I think I have it ready, but it looks like: |
Great @mikeallisonJS 👍 |
Here's what I'm seeing with Babel 6.0.15 .babelrc: {
"presets": ["es2015"]
}
If I remove the presets options from .babelrc, and use the command line option, everything works:
|
@nathancahill do you know why it says 10 ignored statements and 9 ignored branches? I've been having similar issues, but I don't have any ignore comments in my code. Do you? |
I don't @jedmao. I double checked the coverage, and it seems to be working correctly. :shrugs: |
@mikeallisonJS, I picked up where you left off with the Tests are running, it looks like some numbers in the ES6 classes are different than expected, but not too far off. |
You can make a PR to the https://github.com/douglasduteil/isparta/tree/feat-dep-babel-6-compatibility branch |
Cool, submitted #88. Besides the |
For |
Ah sorry, I see you are using stage-0, so it is included. My workaround was not to use global babel config at all for the moment and let isparta use babel5, but rest uses babel6. Scripts get a bit ugly though (since I heed to pass parameters manually) "babel-node": "babel-node --presets es2015,react --plugins transform-es2015-modules-commonjs,transform-object-rest-spread",
"test:cov": "npm run babel-node -- node_modules/isparta/bin/isparta cover --report text --report html --dir reports/coverage --include \"**/!(*-test).js\" test", |
Can we expect an update soon? 😅 |
@douglasduteil @nkbt a working PR #90 |
Thanks @douglasduteil, seems to work fine. |
isparta is not working for me, as before =( |
|
the same lines are working fine with babel v5 and isparta v3 |
@iamstarkov are you sure that |
I'm sure because mocha is working fine with that, take a look at npm test script and its output in travis |
@nkbt how do you use isparta with babel v6 with mocha? |
@iamstarkov I am also having the same issues. Worked fine with babel 5 and isparta v3. Mocha is running the tests just fine on its own |
|
I use Tape and do not use Mocha. No overhead of testing framework, no problems ;) |
le sigh |
Cool ! 👍 |
as this might be mocha specific shall I open a new issue @douglasduteil ? |
Yep |
@Dakuan yep please. Do you have the same problem ? Did you consult my demo here https://github.com/douglasduteil/study-node-path-es6 ? |
Had a look at the study project and have fixed my build :) The trick was adding Thanks for the pointer. |
yep, its working now "coverage": "isparta cover _mocha index.js --include-all-sources -- --require babel-core/register", |
but one pretty big downside, that it includes all files even i explicitly say to cover only index.js |
tell a lie, it's all gone to shit on my CI server. Clearing all my npm stuff has brought it all down:
|
|
I'm not quite sure what sort of issues you have, logs are not very helpful. My projects do not have issues with isparta4/babel6 https://circleci.com/gh/nkbt/react-component-template/148 See this block:
And coverage looks ok as usual. |
@douglasduteil can you help us with mocha framework? |
@iamstarkov, here's what I'm doing with mocha:
Here's the latest build with coverage output: https://travis-ci.org/nathancahill/eminent My .istanbul.yml:
|
@nkbt I'm using tape 4.6.2 and "isparta": "^4.0.0" and I'm still getting |
@playground try nyc |
Can't run tests under a project that uses babel 6 because isparta depends on babel 5...
The text was updated successfully, but these errors were encountered: