-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: toStrictEqual doesn't work on simple arrays returned by C++ addon with node-api #12814
Comments
Actually this also applies to objects too. And I tested that this also occurs with node's |
This applies to node |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This issue was closed because it has been stalled for 7 days with no activity. Please open a new issue if the issue is still relevant, linking to this one. |
This isn't completed nor done... it's a bug. |
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. |
Version
27.3.1
Steps to reproduce
Clone MatrixAI/TypeScript-Demo-Lib#38. Run
nix-shell
to enter into the development environment.Go to
src/native/index.cpp
.This native function just creates an JS array, and sets
5
to it. Basically[5]
.Now in
jest
, go totests/native.test.ts
.Test this:
Expected behavior
I would expect
[0.5]
to be[0.5]
.Actual behavior
It says:
Received: serializes to the same string
.In fact, you can test it like:
And this does work.
Additional context
No response
Environment
System: OS: Linux 5.10 Matrix ML 1 CPU: (16) x64 AMD Ryzen 7 2700X Eight-Core Processor Binaries: Node: 16.14.2 - /nix/store/zl4bvsqfxyx5vn9bbhnrmbmpfvzqj4gd-nodejs-16.14.2/bin/node npm: 8.5.0 - /nix/store/zl4bvsqfxyx5vn9bbhnrmbmpfvzqj4gd-nodejs-16.14.2/bin/npm npmPackages: jest: ^27.2.5 => 27.3.1
The text was updated successfully, but these errors were encountered: