Include symbol properties in matcher diffs

* #1966
This commit is contained in:
Steve Gravrock
2022-05-07 13:26:15 -07:00
parent 9d80377fe3
commit 468e9577cd
7 changed files with 81 additions and 36 deletions

View File

@@ -25,6 +25,10 @@ describe('ObjectPath', function() {
expect(new ObjectPath(['1hello']).toString()).toEqual("$['1hello']");
});
it('renders symbols with squre bracket notation', function() {
expect(new ObjectPath([Symbol('a')]).toString()).toEqual('$[Symbol(a)]');
});
it('renders as the empty string when empty', function() {
expect(new ObjectPath().toString()).toEqual('');
});