Display type correctly for array if obj passed as an array (#1394)

* Display type correctly for array if obj passed as an array

* Narrow the test case for `should throw an error if data is an array`
This commit is contained in:
ilyas akın
2023-02-14 07:06:04 +03:00
committed by GitHub
parent fa60189c87
commit e371afd9bb
2 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ describe('validateData', () => {
})
test('should throw an error if data is an array', () => {
assert.throws(() => validateData([]), /must be an object/)
assert.throws(() => validateData([]), /Data must be an object. Found array./)
})
test("shouldn't throw an error", () => {