Skip to content
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

[v8.x backport] assert: fix boxed primitives in deepStrictEqual #15514

Closed

Conversation

BridgeAR
Copy link
Member

Ref #15050

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

assert

@nodejs-github-bot nodejs-github-bot added assert Issues and PRs related to the assert subsystem. v8.x labels Sep 20, 2017
Unbox all primitives and compare them as well instead of
only comparing boxed strings.

PR-URL: nodejs#15050
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@jasnell
Copy link
Member

jasnell commented Sep 21, 2017

@BridgeAR, this appears to be causing a failure with one of the napi_addon tests:



james@ubuntu:~/node/main$ ./node test/addons-napi/test_conversions/test.js
assert.js:41
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: [Number: NaN] deepStrictEqual [Number: NaN]
    at Object.<anonymous> (/home/james/node/main/test/addons-napi/test_conversions/test.js:118:8)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:607:3
james@ubuntu:~/node/main$

@jasnell
Copy link
Member

jasnell commented Sep 21, 2017

Should that line simply be removed?

@BridgeAR
Copy link
Member Author

@jasnell I already removed that test yesterday?

@jasnell
Copy link
Member

jasnell commented Sep 21, 2017

I just applied this PR today against v8.x-staging and it failed. I see that you removed one of the NaN checks in that file so I'm removing this second one and checking the tests again.

@jasnell
Copy link
Member

jasnell commented Sep 21, 2017

That worked. Landed in v8.x-staging. Thank you!

@jasnell jasnell closed this Sep 21, 2017
@BridgeAR
Copy link
Member Author

@jasnell right, I missed that there were two in there and I did not run the tests again. Thanks for fixing that!

@BridgeAR BridgeAR deleted the backport-15050-to-v8.x branch April 1, 2019 23:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assert Issues and PRs related to the assert subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants