Skip to content

Commit

Permalink
please flow gods
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Apr 15, 2018
1 parent 182bdbb commit 455edb9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/expect/src/index.js
Expand Up @@ -323,13 +323,13 @@ function assertions(expected: number) {
getState().expectedAssertionsNumber = expected;
getState().expectedAssertionsNumberError = error;
}
function hasAssertions(expected: number) {
function hasAssertions(...args) {
const error = new Error();
if (Error.captureStackTrace) {
Error.captureStackTrace(error, hasAssertions);
}

utils.ensureNoExpected(expected, '.hasAssertions');
utils.ensureNoExpected(args[0], '.hasAssertions');
getState().isExpectingAssertions = true;
getState().isExpectingAssertionsError = error;
}
Expand Down

0 comments on commit 455edb9

Please sign in to comment.