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

Fix #1669: catch uncaught errors outside test suite execution #1886

Merged
merged 1 commit into from
Sep 13, 2015
Merged

Fix #1669: catch uncaught errors outside test suite execution #1886

merged 1 commit into from
Sep 13, 2015

Conversation

danielstjules
Copy link
Contributor

For #1669

$ cat test.js
setTimeout(function() {
  throw new Error('oops');
  it('test', function() {});
  run();
}, 100);
// Before PR
$ ~/git/mocha/bin/mocha --delay test.js
$ // EMPTY

// After PR
$ ~/git/mocha/bin/mocha --delay test.js

  1) Uncaught error outside test suite

  0 passing (5ms)
  1 failing

  1)  Uncaught error outside test suite:
     Uncaught Error: oops
      at null._onTimeout (test.js:2:9)

@danielstjules
Copy link
Contributor Author

+1? @boneskull :)

@dasilvacontin
Copy link
Contributor

Looks good! Thanks!

dasilvacontin added a commit that referenced this pull request Sep 13, 2015
Fix #1669: catch uncaught errors outside test suite execution
@dasilvacontin dasilvacontin merged commit d8617b2 into mochajs:master Sep 13, 2015
@danielstjules danielstjules deleted the uncaught-delay branch September 13, 2015 19:58
@danielstjules
Copy link
Contributor Author

🎉 :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants