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

Consider integrating the problems gulp-spawn-mocha had tried to solve #20

Closed
phated opened this issue Jan 26, 2014 · 4 comments · Fixed by #151
Closed

Consider integrating the problems gulp-spawn-mocha had tried to solve #20

phated opened this issue Jan 26, 2014 · 4 comments · Fixed by #151

Comments

@phated
Copy link

phated commented Jan 26, 2014

The github project seems to have been removed, but from my email:

I was having problems with the cache, I don't have a link to anything it just seemed like a limitation of the way it was constructed. That try catch statement will get errors but you can still crash the process (e.g., and naively, process.exit(1). Furthermore, if any variables are set outside of modules (e.g., global scope) then those aren't cleared in the existing mocha plugin which I why I said that a new process will always start cleanly.

@dkushner
Copy link

I was also looking for some of the functionality offered by gulp-spawn-mocha, namely the inclusion of the ability to set environment variables like NODE_ENV. I can't say that I necessarily agree with starting a new process to run every test file. Is that in fact what mocha does normally? It certainly doesn't seem sane to me. If you are faffing about in GLOBAL then you better damn well expect that those properties will be available globally. That particular case seems more like bad practice than a problem with gulp-mocha.

@sindresorhus
Copy link
Owner

I give up. He was right. The Mocha programmatic API is just completely horrible and buggy. Going to spawn instead...

@dsherret dsherret mentioned this issue Sep 18, 2015
Closed
Repository owner locked and limited conversation to collaborators Mar 29, 2016
@shellscape
Copy link
Contributor

shellscape commented Jan 18, 2017

@sindresorhus was your intention with the last comment you made that you were going to scrap using mocha as a straight require and instead spawn mocha in a cp?

@sindresorhus
Copy link
Owner

@shellscape Yes

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

Successfully merging a pull request may close this issue.

4 participants