Skip to content

Commit

Permalink
chore: BigInt is always defined, do not conditionally check for it (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Oct 19, 2021
1 parent 7092dfb commit 9d286a6
Show file tree
Hide file tree
Showing 9 changed files with 216 additions and 264 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.js
Expand Up @@ -26,6 +26,9 @@ module.exports = {
'plugin:eslint-comments/recommended',
'plugin:prettier/recommended',
],
globals: {
BigInt: 'readonly',
},
overrides: [
{
extends: [
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -9,6 +9,7 @@

### Chore & Maintenance

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

### Performance
Expand Down
2 changes: 0 additions & 2 deletions packages/expect/src/__tests__/asymmetricMatchers.test.ts
Expand Up @@ -28,7 +28,6 @@ test('Any.asymmetricMatch()', () => {
any(Number).asymmetricMatch(1),
any(Function).asymmetricMatch(() => {}),
any(Boolean).asymmetricMatch(true),
/* global BigInt */
any(BigInt).asymmetricMatch(1n),
any(Symbol).asymmetricMatch(Symbol()),
any(Object).asymmetricMatch({}),
Expand All @@ -50,7 +49,6 @@ test('Any.asymmetricMatch() on primitive wrapper classes', () => {
any(Function).asymmetricMatch(new Function('() => {}')),
// eslint-disable-next-line no-new-wrappers
any(Boolean).asymmetricMatch(new Boolean(true)),
/* global BigInt */
any(BigInt).asymmetricMatch(Object(1n)),
any(Symbol).asymmetricMatch(Object(Symbol())),
].forEach(test => {
Expand Down

0 comments on commit 9d286a6

Please sign in to comment.