-
-
Notifications
You must be signed in to change notification settings - Fork 306
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
comparing empty array vs empty object with deepEqual #186
Comments
|
@ljharb Thanks for your work on this project. |
|
@ljharb Thanks. That's helpful. |
It's worth noting that var assert = require("assert");
var test = require("tape");
var a = [1];
var b = ["1"];
test(function (t) {
assert.deepEqual(a, b, "not assert.deepEqual");
t.deepEqual(a, b, "not t.deepEqual");
});
// not ok 1 not t.deepEqual For the other readers it's also notable that the deep equal logic does not actually live in this package, FWIW. Also, Node has var a = [1];
var b = [1];
b.length = 2; ^^ In reference to:
|
|
It sounds like the only issue here is that tape's If that is the only deviation from |
@ljharb the @substack would you mind updating that? I would also be willing to open a PR for it if someone looks into it. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…s assert.deepEqual Fixes #12. Relates to tape-testing/tape#186
…s assert.deepEqual Fixes #12. Relates to tape-testing/tape#186
…s assert.deepEqual Fixes #12. Relates to tape-testing/tape#186
…s assert.deepEqual Fixes #12. Relates to tape-testing/tape#186
…s assert.deepEqual Fixes #12. Relates to tape-testing/tape#186
…s assert.deepEqual Fixes #12. Relates to tape-testing/tape#186
…s assert.deepEqual Fixes #12. Relates to tape-testing/tape#186
With v5, and deep-equal v2, tape now matches node's assert. |
doing
t.deepEqual({}, [])
evaluates as true. I would expect it to be false.The text was updated successfully, but these errors were encountered: