Skip to content

Commit 6c13e73

Browse files
committed
test: fix
1 parent 5a39eff commit 6c13e73

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/service.test.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ await test('constructor', () => {
6868
new Service(db)
6969
if (Array.isArray(db.data['posts'])) {
7070
const id = db.data['posts']?.at(1)?.['id']
71-
assert.ok(id instanceof String, 'id should be a string')
72-
assert.ok(id.length > 0, 'id should not be empty')
71+
assert.ok(
72+
typeof id === 'string' && id.length > 0,
73+
`id should be a non empty string but was: ${String(id)}`,
74+
)
7375
}
7476
})
7577

0 commit comments

Comments
 (0)