-
Notifications
You must be signed in to change notification settings - Fork 250
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
Implement hit counter in the mocha-runner #3193
Implement hit counter in the mocha-runner #3193
Conversation
Thanks! Will have an look later this week. |
I had a look and found the issue here. I saw you copy pasted the test from the I simply removed that test. |
I guess there's a similar issue with Jasmine (see the other PR #3199 ) |
Ah yes. JavaScript is single threaded. Meaning an infinite loop will block everything. Even mocha's timeout mechanism doesn't have a way of handling them. The only reason karma is able to handle them is because karma starts the tests in a separate process (the browser). All other test runners we support use the host nodejs process to run the tests (even jest, because we run with The timeout decorator also works for Karma, but because Karma can be very slow to restart, we've added additional handling in the karma-runner 🤷♀️. |
5b2e5b3
to
4abcdca
Compare
This PR fixes issue #3172 :
test
in packagemocha-runner
)test
ande2e
respectively)The only issue that I could not solve is Mocha not detecting loop timeout in the integration test suite (file
packages/mocha-runner/test/integration/timeout-on-infinite-loop.it.spec.ts
, the offending test is marked as.skip
). I tried changing the timeout options at many places (test, runner, options file, command line, etc) but to no avail. Despite that, the overall behavior seems correct.