forked from jestjs/jest
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(jest-util): pass more globals through
passing a set of commong globals through to the env to ensure instanceof checks work as expected. Fixes jestjs#4422
- Loading branch information
1 parent
9075ecf
commit e758423
Showing
2 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
16 changes: 16 additions & 0 deletions
16
integration_tests/test-environment/__tests__/globals.test.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
/** | ||
* Copyright (c) 2014-present, Facebook, Inc. All rights reserved. | ||
* | ||
* This source code is licensed under the BSD-style license found in the | ||
* LICENSE file in the root directory of this source tree. An additional grant | ||
* of patent rights can be found in the PATENTS file in the same directory. | ||
* | ||
* @jest-environment node | ||
*/ | ||
'use strict'; | ||
/* eslint-env node */ | ||
|
||
test('globals', () => { | ||
const buf = Buffer.from('hello'); | ||
expect(buf instanceof Uint8Array).toEqual(true); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters