initial commit

This commit is contained in:
yiling
2026-05-19 16:05:09 +08:00
commit 9cad96210c
370 changed files with 131609 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
import { afterEach, beforeEach } from 'vitest'
import { getPrismaTestingHelper } from '@/db'
export function setupTestDbHooks() {
beforeEach(async () => {
await getPrismaTestingHelper().startNewTransaction()
})
afterEach(() => {
getPrismaTestingHelper().rollbackCurrentTransaction()
})
}