Skip to content

Commit 9d286a6

Browse files
authored
chore: BigInt is always defined, do not conditionally check for it (#11979)
1 parent 7092dfb commit 9d286a6

File tree

9 files changed

+216
-264
lines changed

9 files changed

+216
-264
lines changed

.eslintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ module.exports = {
2626
'plugin:eslint-comments/recommended',
2727
'plugin:prettier/recommended',
2828
],
29+
globals: {
30+
BigInt: 'readonly',
31+
},
2932
overrides: [
3033
{
3134
extends: [

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
### Chore & Maintenance
1111

12+
- `[expect]` `BigInt` global is always defined, don't check for its existence at runtime ([#11979](https://github.com/facebook/jest/pull/11979))
1213
- `[jest-config, jest-util]` Use `ci-info` instead of `is-ci` to detect CI environment ([#11973](https://github.com/facebook/jest/pull/11973))
1314

1415
### Performance

packages/expect/src/__tests__/asymmetricMatchers.test.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ test('Any.asymmetricMatch()', () => {
2828
any(Number).asymmetricMatch(1),
2929
any(Function).asymmetricMatch(() => {}),
3030
any(Boolean).asymmetricMatch(true),
31-
/* global BigInt */
3231
any(BigInt).asymmetricMatch(1n),
3332
any(Symbol).asymmetricMatch(Symbol()),
3433
any(Object).asymmetricMatch({}),
@@ -50,7 +49,6 @@ test('Any.asymmetricMatch() on primitive wrapper classes', () => {
5049
any(Function).asymmetricMatch(new Function('() => {}')),
5150
// eslint-disable-next-line no-new-wrappers
5251
any(Boolean).asymmetricMatch(new Boolean(true)),
53-
/* global BigInt */
5452
any(BigInt).asymmetricMatch(Object(1n)),
5553
any(Symbol).asymmetricMatch(Object(Symbol())),
5654
].forEach(test => {

0 commit comments

Comments
 (0)