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

Warn when users verify an invocation they also stubbed #76

Closed
searls opened this issue Mar 13, 2016 · 0 comments
Closed

Warn when users verify an invocation they also stubbed #76

searls opened this issue Mar 13, 2016 · 0 comments

Comments

@searls
Copy link
Member

searls commented Mar 13, 2016

This is a super common error that we can detect and warn for. If you stub a particular invocation like fetch(42), then it means the subject needs that return value to do something else and the test's assertion should be about that something else. To also verify that fetch(42) was called ought to be redundant.

Is console.warn the best way to warn users in browsers & node? Should I throw an error but with a squelchWarnings config option?

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

No branches or pull requests

1 participant