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

Consolidates asserts#equal branches for keyed collections (Map/Set) and supports deep equality of Map keys #3258

Merged
merged 13 commits into from
Nov 4, 2019
Merged
Next Next commit
Adds array test cases for asserts#equal
  • Loading branch information
jamesseanwright committed Nov 3, 2019
commit e560e700a87735f90e6177b81736d6cfcf9ddb0c
5 changes: 5 additions & 0 deletions std/testing/asserts_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@ test(function testingEqual(): void {
new Map([["foo", new Map([["bar", "qux"]])]])
)
);

assert(equal([1, 2, 3], [1, 2, 3]));
assert(equal([1, [2, 3]], [1, [2, 3]]));
assert(!equal([1, 2, 3, 4], [1, 2, 3]));
assert(!equal([1, 2, 3, 4], [1, 2, 3]));
});

test(function testingNotEquals(): void {
Expand Down