Skip to content

Commit

Permalink
Test that a BigInt does not equal the equivalent number
Browse files Browse the repository at this point in the history
  • Loading branch information
papandreou committed Dec 17, 2019
1 parent 0ed7b55 commit 9a5c43e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/types/BigInt-type.spec.js
Expand Up @@ -6,6 +6,14 @@ if (typeof BigInt === 'function') {
expect(a, 'to equal', a);
});

it('should not be considered equal to the equivalent number', () => {
expect(
() => expect(BigInt(1), 'to equal', 1),
'to throw',
'expected BigInt(1) to equal 1'
);
});

it('should inspect as source code', () => {
const a = BigInt(123);
expect(a, 'to inspect as', 'BigInt(123)');
Expand Down

0 comments on commit 9a5c43e

Please sign in to comment.