Skip to content

Commit

Permalink
Ensure use-t-well supports throwsAsync/ notThrowsAsync assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
gajus authored and novemberborn committed Aug 1, 2018
1 parent 1785f9b commit 5dcec8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions test/use-t-well.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ ruleTester.run('use-t-well', rule, {
testCase('t.notDeepEqual(v, v);'),
testCase('t.throws(fn);'),
testCase('t.notThrows(fn);'),
testCase('t.throwsAsync(fn);'),
testCase('t.notThrowsAsync(fn);'),
testCase('t.regex(v, /v/);'),
testCase('t.notRegex(v, /v/);'),
testCase('t.snapshot(v);'),
Expand Down
4 changes: 3 additions & 1 deletion util.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,12 +168,14 @@ const assertionMethodsNumArguments = new Map([
['is', 2],
['not', 2],
['notDeepEqual', 2],
['notRegex', 2],
['notThrows', 1],
['notThrowsAsync', 1],
['pass', 0],
['regex', 2],
['notRegex', 2],
['snapshot', 1],
['throws', 1],
['throwsAsync', 1],
['true', 1],
['truthy', 1]
]);
Expand Down

0 comments on commit 5dcec8b

Please sign in to comment.