Skip to content
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

There should be a big, fat warning about this plugin sharing state between mocha runs in a watch task #110

Closed
coaxial opened this issue Oct 18, 2015 · 1 comment

Comments

@coaxial
Copy link
Contributor

coaxial commented Oct 18, 2015

I switched to Gulp not too long ago and I setup a watch task to run my mocha tests as soon as one of the code or spec files are saved.

For a couple of weeks I couldn't understand what I was doing wrong and why my tests eventually kept on failing in the watch task but were fine when run from the CLI with mocha test.

I eventually discovered that it's because gulp-mocha runs the tests in the same process as Gulp and so mocha's state isn't 100% reset between runs.

Then I came across gulp-spawn-mocha which addresses this very issue.

The README should come with a warning when using gulp-mocha in a watch task. I wasted a lot of time trying to figure it out and was almost ready to give up Gulp.

Jameskmonger added a commit that referenced this issue Mar 30, 2016
@Jameskmonger
Copy link
Contributor

This has been fixed by #111.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants