mirror of
https://github.com/typicode/json-server.git
synced 2025-08-02 11:32:47 +08:00
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:
@ -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", () => {
|
||||
|
Reference in New Issue
Block a user