You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Clone the repo, run yarn install, run yarn test, and you will see a test failure in the affected configuration.
$ yarn test
yarn run v1.6.0
(node:21279) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
$ jest
FAIL ./index.test.js
✕ ArrayBuffer test (7ms)
● ArrayBuffer test
expect(received).toBe(expected) // Object.is equality
Expected value to be:
true
Received:
false
1 | test('ArrayBuffer test', () => {
2 | const array = new Uint8Array(8);> 3 | expect(array.buffer instanceof ArrayBuffer).toBe(true);
4 | });
5 |
at Object.<anonymous>.test (index.test.js:3:47)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 0.63s, estimated 1s
Ran all test suites.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
🐛 Bug Report
Updating to node version 10.0.0 caused a failure in our tests which boiled down to an
instanceof ArrayBuffer
check failing. Here's the reduced test:To Reproduce
Execute the test given above using node v10.0.0 on macOS.
Expected behavior
When dealing with a typed array, that array's
buffer
property should always beinstanceof ArrayBuffer
.Link to repl or repo (highly encouraged)
https://github.com/mstange/jest-arraybuffer-testcase
Clone the repo, run
yarn install
, runyarn test
, and you will see a test failure in the affected configuration.Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: