Skip to content

Commit

Permalink
Merge pull request #428 from ZIMkaRU/bugfix/fix-error-metadata-proces…
Browse files Browse the repository at this point in the history
…sing

Fix test cases for error metadata
  • Loading branch information
ezewer authored Dec 2, 2024
2 parents 5f62dd7 + 132d5ee commit e26f745
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/test-cases/api-sync-mode-sqlite-test-cases.js
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ module.exports = (
assert.isObject(res.body.error)
assert.propertyVal(res.body.error, 'code', 401)
assert.propertyVal(res.body.error, 'message', 'Unauthorized')
assert.propertyVal(res.body.error, 'data', null)
assert.isObject(res.body.error.data)
assert.propertyVal(res.body, 'id', 5)
assert.isString(res.body.jsonrpc)
})
Expand Down Expand Up @@ -1800,10 +1800,11 @@ module.exports = (
assert.isObject(res.body)
assert.isObject(res.body.error)
assert.propertyVal(res.body.error, 'code', 400)
assert.isArray(res.body.error.data)
assert.isAbove(res.body.error.data.length, 0)
assert.isObject(res.body.error.data)
assert.isArray(res.body.error.data.errorMetadata)
assert.isAbove(res.body.error.data.errorMetadata.length, 0)

res.body.error.data.forEach((item) => {
res.body.error.data.errorMetadata.forEach((item) => {
assert.isObject(item)
})

Expand Down

0 comments on commit e26f745

Please sign in to comment.