-
-
Notifications
You must be signed in to change notification settings - Fork 35.7k
assert.js rule 7.4 (similar to CJS rule 7.3)Β #9063
Copy link
Copy link
Closed
Labels
assertIssues and PRs related to the assert subsystem.Issues and PRs related to the assert subsystem.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
Metadata
Metadata
Assignees
Labels
assertIssues and PRs related to the assert subsystem.Issues and PRs related to the assert subsystem.good first issueIssues that are suitable for first-time contributors.Issues that are suitable for first-time contributors.
Type
Fields
Give feedbackNo fields configured for issues without a type.
v6.1.0Linux βββ 3.13.0-97-generic #144-Ubuntu SMP Thu Sep 22 16:23:22 UTC 2016 i686 i686 i686 GNU/LinuxHi,
I'm developing an assert lib and it disagrees with node's. While debugging, I found rule 7.4 in master/lib/assert.js @ d4061a6 that to me sounds very similar to rule 7.3 in the CJS spec:
I think the condition tests both values for being primitives, aka not objects. Firefox seems to agree:
So one passes the object check, the other does not, as expected.
Is it a pair where both values pass the object check? No.
So shouldn't it count as a "[pair] that do not both pass typeof [β¦] object"?
If the partial conditions negate the object check and check for being primiteves instead, shouldn't the binary operator change to
||?Pre-emptive: In case anyone feels inclined to discuss the quality of the CJS UT spec and/or how much better
deepStrictEqualis, please make another issue for that.