Comments (7)
It does account for that by emitting another event called exit
after the process actually exits here. You should wait for that event before exiting your grunt task.
from mocha-chrome.
Hm, I don't have that issue on my end. If you can create a failing test case and a fix, please submit a PR for both.
from mocha-chrome.
i just based my code off the test code here: https://github.com/shellscape/mocha-chrome/blob/master/test/api.js. is there another, more complete sample i can use that works correctly in this case?
from mocha-chrome.
also, if the close()
promise isn't ever getting resolved, when does the this.instance.kill();
line run?
maybe i'm missing something, but i don't see how this can ever work in the test failure case.
from mocha-chrome.
that should also wait for exit
. It's just a race condition if you're listening on just ended
. Mocha doesn't exit anymore explicity, so without --exit
it should actually eventually wait for all the chrome processes to exit. I bet there are multiple at a time, and maybe the CI test run does have a process hanging around.
from mocha-chrome.
It does account for that by emitting another event called exit after the process actually exits here
i think you're missing my point: that code never gets called.
Lines 158 to 161 in 0f596aa
the first await
(L158) results in a Promise
being returned from that function, but (in the test failure case) that Promise
is promptly dropped on the floor (by Nanobus). it is never resolved and neither L159 nor L161 are executed. there's no race condition. the exit
bus event is never fired.
from mocha-chrome.
@Spongman a better way to handle your frustration (that's what I'm sensing) would have been to create a failing test case and submit a fix for it. of course, there are always alternatives you can also use, including mocha-headless-chrome
which works in a similar manner. this is a community-run, open-source project that people donate their time to when they can. it's free, and we're not always going to be able to predict, nor understand what someone else is reporting, so community contributions are key to improving the project. please bear that in mind in the future for any project you use.
from mocha-chrome.
Related Issues (19)
- net::ERR_INSECURE_RESPONSE when protocol is https HOT 1
- mocha-chrome: unexpected token HOT 6
- Incorrect `mocha.run()` called with no tests HOT 11
- Add a pre exit hook HOT 4
- Feature request: Pass args to chrome HOT 17
- Unicode characters become garbled on Windows HOT 7
- Feature request: Allow customization/confguration of the mocha start timeout HOT 5
- Ability to save results to file, like mocha-phantomjs HOT 4
- 'Error: no test specified'
- feature request: override default chrome parameters HOT 3
- Custom reporter suggestion HOT 1
- test failures with recent builds of chrome HOT 3
- With xunit reporter, output is inconsistent, and output option can't be set HOT 1
- mocha's output is always uncolorified HOT 2
- how to debug, mocha-chrome not detecting mocha.run
- Is this still maintained? HOT 2
- Add support of Node 6.x HOT 4
- Unexpected token function HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mocha-chrome.