javascript - Disable error handling for mocha.js -


does know if there way disable error handling mocha?

i'd let exception bubble , handled browser during debugging.

update: context this. - code throw's unexpected error. - disable "try/catch" (something jasmine's tests do) , thrown debugger in chrome.

this way can inspect current state of application @ moment. sounds there isn't built in, , need manually each time odd error in test. maybe wrapping code with

try {   somethingthatbreaks(); } catch(e) {   debugger; } 

mocha installs own onerror handler trap exceptions may occur in asynchronous code. can disable with:

window.onerror = undefined; 

this dangerous. should when must absolutely so. if make routine thing, mocha miss errors happen in asynchronous code.

if want let exceptions in synchronous code bubble up, i'm not seeing accomplish. if want inspect exception before mocha touches it, try...catch block wrapping test this.


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -