eslint-plugin-ava
eslint-plugin-ava copied to clipboard
Suggest `t.throws` for things like `catch`, `exception`, `error`. Also other synonyms?
Just an idea I'm throwing out: it would be nice to add in suggestions for synonyms and typos when someone can't remember the name of an assertion correctly. In my case just now it was that i couldn't remember throws
, but it would be nice for ok
-> pass
, equals
-> is
, etc.
Good idea!
ok
->pass
This is not correct though. Should be: ok
-> truthy
At least that's how ok
works in many other test runners.
For a list of things to warn about, see the list of assertions here (at least those who don't match our names) and their aliases: https://github.com/substack/tape#tokvalue-msg