mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-23 18:17:57 +00:00
fix(tests): remove prohibited any cast from collection api tests
This commit is contained in:
@@ -4,6 +4,9 @@ import { authzService, Permission, ResourceType } from '@shumai/core/src/authz/a
|
||||
import { Hono, Context, Next } from 'hono'
|
||||
import collectionRoute from './collection'
|
||||
import { s3Service } from '@shumai/core/src/s3/s3'
|
||||
import type { Prisma } from '@shumai/db'
|
||||
|
||||
type User = Prisma.UserGetPayload<Record<string, never>>
|
||||
|
||||
vi.mock('@shumai/core/src/s3/s3', () => ({
|
||||
s3Service: {
|
||||
@@ -64,7 +67,7 @@ describe('Collection API', () => {
|
||||
id: 'user-1',
|
||||
name: 'Test User',
|
||||
image: 'avatars/test.png',
|
||||
} as any,
|
||||
} as unknown as User,
|
||||
creatorId: 'user-1',
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user