Documentation / zerotal / testing / assertDatabaseHas
Function: assertDatabaseHas()
assertDatabaseHas(
table,where):Promise<void>
Defined in: packages/testing/src/assertions.ts:33
Assert that at least one row in table matches all key/value pairs in where.
Parameters
table
string
where
Record<string, unknown>
Returns
Promise<void>
Example
await assertDatabaseHas('users', { email: 'alice@example.com' });