mirror of
https://github.com/saltbo/zpan.git
synced 2026-08-28 15:51:29 +08:00
test: restore shared Cloudflare mocks
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { env } from 'cloudflare:workers'
|
||||
import { beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { DirType } from '../../shared/constants'
|
||||
import { generateId } from '../../shared/ids'
|
||||
import type { CreateShareInput } from '../../shared/schemas/share'
|
||||
@@ -144,6 +144,10 @@ describe('[CF] saveShareToDrive — stream copy via D1', () => {
|
||||
vi.spyOn(S3Service.prototype, 'streamCopy').mockResolvedValue(undefined)
|
||||
})
|
||||
|
||||
afterEach(() => {
|
||||
vi.restoreAllMocks()
|
||||
})
|
||||
|
||||
it('saves a single file to the target org on D1', async () => {
|
||||
const db = buildDb()
|
||||
const srcOrgId = generateId()
|
||||
|
||||
Reference in New Issue
Block a user