Skip to content

Commit

Permalink
Make empty object checking consistent in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Glazy committed Feb 25, 2025
1 parent 36f4868 commit 6d6f77d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('withZodSchema', () => {
},
})

expect(Object.keys(result).length).toEqual(0)
expect(result).toStrictEqual({})
})

it('returns field error if no children have errors', () => {
Expand Down Expand Up @@ -99,7 +99,7 @@ describe('withZodSchema', () => {
favouriteColours: ['Yellow', 'Blue', 'Purple', 'Red'],
})

expect(Object.keys(result).length).toEqual(0)
expect(result).toStrictEqual({})
})

it('returns error in array correctly', () => {
Expand Down Expand Up @@ -134,7 +134,7 @@ describe('withZodSchema', () => {
],
})

expect(Object.keys(result).length).toEqual(0)
expect(result).toStrictEqual({})
})

it('returns field error if no children have errors', () => {
Expand Down

0 comments on commit 6d6f77d

Please sign in to comment.