UNPKG

create-cf-planetscale-app

Version:

Create a Cloudflare workers app for building production ready RESTful APIs using Hono

15 lines (12 loc) 448 B
import { beforeEach } from 'vitest' import { Config } from '../../src/config/config' import { getDBClient, Database } from '../../src/config/database' const clearDBTables = (tables: Array<keyof Database>, databaseConfig: Config['database']) => { const client = getDBClient(databaseConfig) beforeEach(async () => { for (const table of tables) { await client.deleteFrom(table).executeTakeFirst() } }) } export { clearDBTables }