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

Change tests to fail on logged errors unless they are expected #7381

Closed
cramforce opened this issue Feb 6, 2017 · 1 comment · Fixed by #14336 or #14432
Closed

Change tests to fail on logged errors unless they are expected #7381

cramforce opened this issue Feb 6, 2017 · 1 comment · Fixed by #14336 or #14432

Comments

@cramforce
Copy link
Member

A recent change no longer async throws these errors, but relying on that to fail the test was always brittle.

It would be great if we could add a device to expect error logs and fail tests if they don't do so.

@rsimha
Copy link
Contributor

rsimha commented Apr 6, 2018

In #14336, a stub was checked in for console.error that would throw an error when called from within a test.

It turns out that a more elegant way of doing this is via a mock. Coming up via #14432.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment