Skip to content

Commit

Permalink
test: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
typicode committed Jan 7, 2024
1 parent 5a39eff commit 6c13e73
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,10 @@ await test('constructor', () => {
new Service(db)
if (Array.isArray(db.data['posts'])) {
const id = db.data['posts']?.at(1)?.['id']
assert.ok(id instanceof String, 'id should be a string')
assert.ok(id.length > 0, 'id should not be empty')
assert.ok(
typeof id === 'string' && id.length > 0,
`id should be a non empty string but was: ${String(id)}`,
)
}
})

Expand Down

0 comments on commit 6c13e73

Please sign in to comment.