File
Blob: tests/helpers/worker-hooks.ts
| 1 | import { afterEach, beforeEach } from "vitest"; |
| 2 | |
| 3 | import { applyAppMigrations, drainProjectDoAlarms } from "./runtime"; |
| 4 | |
| 5 | export const registerWorkerRuntimeHooks = (): void => { |
| 6 | beforeEach(async () => { |
| 7 | await applyAppMigrations(); |
| 8 | }); |
| 9 | |
| 10 | afterEach(async () => { |
| 11 | await drainProjectDoAlarms(); |
| 12 | }); |
| 13 | }; |