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
After upgrading to version 4 mocha tests no longer run #156
Comments
same here |
👍 I have the same issue Here is an example app that reproduces this issue Installing |
Just add: mocha({
compilers: 'js:babel-core/register',
// ...
}) |
@tkirda I tried that along with many other suggestion. I made an example app that reproduces issue here. This is the gulpfile.js
What am I doing wrong? |
Look at my sample, compilers is not an object, but a string value: |
Sorry, I made a typo above >.< @tkirda the below works with mocha@4.0.1
I expect this question to come up a lot, so I created a pull request. Many Thanks! |
what about users who dont use babel? |
@miroslawmajka Have you tried deleting your node_modules folder and reinstalling with npm install? |
@hooddanielc Yes, just tried that exact scenario with deleting node_modules and installing version 4.0.1 of gulp mocha. Tests eventually run but with the following error message:
Going back to 3.0.1 again as this isn't stable. We have no intention in using babel as it has proven to be very slow in our automated test scenarios. |
@miroslawmajka your problem is almost certainty IPC related. I think it has something to do with this commit. 3e55175 . Multi platform IPC has given me a lot of problems before especiallly when developing after Linux implementations. Maybe execa might be the issue. |
@miroslawmajka what happens when you run gulp-mocha's unit test? |
|
@miroslawmajka Please clone
If you install your modules locally, any script commands defined in package.json will look in your local node_modules/.bin folder automatically. |
@hooddanielc all passed (4 tests). Not sure why it wouldn't work inside the project. |
I have a feeling this issue is caused by outdated global modules. Try adding your global modules to your package.json. npm might be doing some magic. Install gulp and mocha locally ''' Uninstall global modules ''' Execute local gulp ''' If you don't like typing all that out you can either add a test property to scripts object in package.json like gulp-mocha does or just make sure you keep updating your global modules which can be a confusing waist of time sometimes. BTW, I would reconsider using babel with gulp. It's gotten a lot better and faster. Hope this helps because I'm out of ides. Good luck. |
After uninstalling global mocha and gulp this started working again. Installed both global modules and still works. So that's out of the way. The downside now is that all our Mocha tests run but the actual output with gulp-mocha 4.0.1 only appears when all is finished. No realtime results using the spec reporter. So this is partially resolved by having to remove the global mocha and gulp modules (old stuff cached there?) but you cannot see realtime progress of your tests. |
Do your tests typically take a really long time? What is the average time spent on completing test? |
Depends, UI tests take up to 20 minutes, API tests usually up to 4 (that's Mocha and Cucumber times put together). |
I've made a PR which restores a previous behavior: |
I have the same issue just install mocha globally and resolve the issue. |
The program just hangs with gulp-mocha version 4:
Task:
Upon downgrading to 3.0.1 all works fine.
System: Windows 10
Node: 6.10.0
Some of the relevant gulp package:
The text was updated successfully, but these errors were encountered: