Skip to content

Commit 4b4eebc

Browse files
authored
Use correct assert() method so we get good error messages. (#728)
BEFORE: AssertionError: expected null to roughly deeply equal undefined AFTER: AssertionError: expected { Object (elements) } to roughly deeply equal { Object (elements) } + expected - actual { "elements": [ { - "internalValue": "foo" + "internalValue": "tag" "typeOrder": 4 } ] }
1 parent b60ffff commit 4b4eebc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/firestore/test/util/equality_matcher.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ export function addEqualityMatcher(): void {
7171
utils.flag(this, 'message', msg);
7272
const left = utils.flag(this, 'object');
7373

74-
chai.assert(
74+
new chai.Assertion(left).assert(
7575
customDeepEqual(left, right),
7676
'expected #{act} to roughly deeply equal #{exp}',
7777
'expected #{act} to not roughly deeply equal #{exp}',
7878
left,
7979
right,
80-
true
80+
/*showDiff=*/ true
8181
);
8282
} else {
8383
originalFunction.apply(this, args);

0 commit comments

Comments
 (0)