Skip to content

Commit

Permalink
use flag forwarding
Browse files Browse the repository at this point in the history
Co-authored-by: Andreas Lind <andreaslindpetersen@gmail.com>
  • Loading branch information
boneskull and papandreou committed Nov 4, 2020
1 parent a3b8e0b commit 21553b7
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/unexpectedMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -507,11 +507,7 @@ function createUnexpectedMap(expect) {
);

expect.addAssertion('<Map> [not] to have size <number>', (expect, subject, expectedSize) => {
if (expect.flags.not) {
expect(subject.size === expectedSize, 'to be false');
} else {
expect(subject.size === expectedSize, 'to be true');
}
expect(subject.size, '[not] to equal', expectedSize);
});
}

Expand Down

0 comments on commit 21553b7

Please sign in to comment.