-
Notifications
You must be signed in to change notification settings - Fork 307
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
Provide a way to ignore specific global errors #986
Comments
I tested updating https://github.com/theintern/intern/blob/master/src/lib/executors/Browser.ts#L34 to ignore ResizeObserver errors and the error is gone in |
Provide two new config properties, warnOnUnhandledRejection and warnOnUncaughtException. When one or both of these are set to true, any unhandled rejection or exception will be treated as a warning rather than a failing error. When set to a string or regexp, it will be matched aagainst any error or rejection reason; matching errors/reasons will be treated as warnings, others will be failures. resolves #986
@schontz If you get a chance, try out the ignore-global-errors branch. It adds two new config properties, |
Attempted to install it, but npm doesn't like what I'm doing... C:\dev\_head\cadsrc\client>npm i -D theintern/intern#ignore-global-errors
npm ERR! path C:\dev\_head\cadsrc\client\node_modules\intern\bin\intern.js
npm ERR! code ENOENT
npm ERR! errno -4058
npm ERR! syscall chmod
npm ERR! enoent ENOENT: no such file or directory, chmod 'C:\dev\_head\cadsrc\client\node_modules\intern\bin\intern.js'
npm ERR! enoent This is related to npm not being able to find a file. |
You'll need to build the package locally. Checkout the |
It works beautifully! I added this to "warnOnUncaughtException": "ResizeObserver loop limit exceeded" Thank you. FYI, installing
But it works using cygwin. Windows is expecting |
Glad it works! And thanks for catching the Windows install issue. I try to be cross platform, but it's easy for those kinds of issues to slip through. |
Sure thing. Most folks won't be developing intern on Windows, but, alas, here we are! |
Since this is a new feature, it'll go out in 4.5. |
ResizeObserver can cause global errors that aren't functionally significant. The Browser executor catches unhandled global errors and emits them as error events.
Expected behavior
Benign ResizeObserver errors should not cause a test suite to fail.
Current behavior
Unhandled global errors, such as those emitted by ResizeObserver, are treated as suite-level errors.
Environment
Intern version: 4.x
Browser version: Chrome 73
OS: Windows
The text was updated successfully, but these errors were encountered: