-
-
Notifications
You must be signed in to change notification settings - Fork 61
Closed
Description
Hi!
I'm developing an assert lib and it disagrees with this one:
~/commonjs-assert$ git-log-concise -n 1
Mon 2016-06-27 02:58 f8975ca Add deepStrictEqual to the README (#23)
~/commonjs-assert$ nodejs -e 'require("./assert.js").deepEqual(true, [ 1 ]);'
[…]
AssertionError: true deepEqual [ 1 ]
I'd prefer my lib to also throw an error on this, but I can't find permission for that in the CJS Unit Testing 1.0 spec. According to my lib, rule 7.3 applies, because one of the values is not an object, so they don't "both pass" the typeof object test. As said, I prefer your module's behavior, so what reading of the spec did you come up with to legitimate throwing?
Node.js also throws, but to me it seems it's unintentional there.
Metadata
Metadata
Assignees
Labels
No labels