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

Added option to allow unhandled exceptions to propagate in the browser #1659

Closed
wants to merge 12 commits into from

Conversation

amsul
Copy link
Contributor

@amsul amsul commented Apr 18, 2015

Related to #553

This adds the mocha.allowUncaught method.

When the method isn’t invoked, the console is empty:

http://i.imgur.com/VCnAWhQ.png

When the method is invoked, the console shows the unhandled exception:

http://i.imgur.com/aEKVY4m.png

jlai and others added 2 commits January 6, 2015 18:26
This results in a slight change to the behavior of --async-only:
instead of failing immediately, check to see if the test returned
a promise (or otherwise failed) before complaining about not
having a done callback.
* commit '7657cb11d960cf2cd8407b256019b2e34dc93328':
  Allow --async-only to be satisfied by returning a promise
@garrettg123
Copy link

+1

@boneskull
Copy link
Member

I don't get it. Why don't we just do both?

@amsul
Copy link
Contributor Author

amsul commented Apr 18, 2015

@boneskull now it does 👍

@boneskull
Copy link
Member

@mochajs/mocha seems like a good idea to me for minor release. if there is no disagreement I will merge this

@boneskull
Copy link
Member

@amsul can you rebase on top of branch v2.3.0?

@boneskull boneskull added this to the v2.3.0 milestone Apr 18, 2015
@amsul
Copy link
Contributor Author

amsul commented Apr 18, 2015

@boneskull done

@a8m
Copy link
Contributor

a8m commented Apr 18, 2015

lgtm.
Can you please squash your commits @amsul ?

keithamus and others added 10 commits April 18, 2015 12:55
Show string diff as a raw data, this fix issue mochajs#1241.
added tests for allowUncaught option

error handler prints to dom with allowUncaught
This results in a slight change to the behavior of --async-only:
instead of failing immediately, check to see if the test returned
a promise (or otherwise failed) before complaining about not
having a done callback.
fixed merge issues

fixed merge issues

fixed merge issues
@boneskull
Copy link
Member

@amsul I don't think you can actually change which branch you're making a PR against, so you may want to actually open a new one. I'm going to close this to make sure it doesn't get accidentally merged.

  1. Checkout the v2.3.0 branch
  2. Probably just cherry-pick changeset 10dcd85 on top of it
  3. Create new PR against v2.3.0 branch

Thanks!

@boneskull boneskull closed this Apr 18, 2015
boneskull added a commit that referenced this pull request May 9, 2015
Added option to allow unhandled exceptions to propagate in the browser (rel #1659)
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

7 participants