Skip to content

Commit

Permalink
Add an additonal test for deeper keys
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzzz committed Feb 20, 2019
1 parent d2f5228 commit 04ebef5
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/expect/src/__tests__/matchers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ describe('.toStrictEqual()', () => {
expect([{a: undefined}]).not.toStrictEqual([{}]);
});

it('does not ignore keys with undefined values deep inside an object', () => {
expect([{a: [{a: undefined}]}]).not.toStrictEqual([{a: [{}]}]);
});

it('passes when comparing same type', () => {
expect({
test: new TestClassA(1, 2),
Expand Down

0 comments on commit 04ebef5

Please sign in to comment.