Skip to content

Commit

Permalink
Add tests for bigint syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshRosenstein committed Apr 30, 2019
1 parent 5bf3acc commit be5cbb6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/jest-matcher-utils/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -307,3 +307,22 @@ describe('getLabelPrinter', () => {
}).toThrow();
});
});

if (isBigIntAllowed) {
describe('bigint Syntax', () => {
test('stringify()', () => {
// @ts-ignore
expect(stringify(1n)).toBe('1n');
});

test('toEqual()', () => {
// @ts-ignore
expect(1n).toEqual(BigInt(1));
});

test('diff()', () => {
// @ts-ignore
expect(diff(1n, 2n)).toBe(null);
});
});
}

0 comments on commit be5cbb6

Please sign in to comment.