refactor(transcode): relocate TranscodeService to core and flatten API package

This commit is contained in:
yiling
2026-06-16 09:47:27 +08:00
parent 7f6e41708a
commit f16a8a7069
51 changed files with 161 additions and 159 deletions
+31
View File
@@ -0,0 +1,31 @@
import { describe, expect, it, vi, beforeEach, afterEach } from 'vitest'
import { Hono } from 'hono'
import authnRoute from './authn'
import { teamService } from '@shumai/core/src/team/team'
describe('authn api', () => {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
let mockGetSignupInfo: any
beforeEach(() => {
mockGetSignupInfo = vi.spyOn(teamService, 'getSignupInfo')
})
afterEach(() => {
vi.restoreAllMocks()
})
it('GET /signup-info', async () => {
mockGetSignupInfo.mockResolvedValue({
userCount: 5,
})
const app = new Hono().route('/', authnRoute)
const res = await app.request('/signup-info')
expect(res.status).toBe(200)
expect(await res.json()).toEqual({
userCount: 5,
})
})
})