mirror of
https://github.com/margrop/wrong-notebook.git
synced 2026-12-05 06:29:27 +08:00
test: 修正数据安全测试中请求参数的类型
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -183,7 +183,7 @@ describe('管理后台接口', () => {
|
||||
});
|
||||
|
||||
describe('/api/tags 自定义标签', () => {
|
||||
const request = (url: string, init?: RequestInit) => new NextRequest(`http://localhost${url}`, init);
|
||||
const request = (url: string, init?: ConstructorParameters<typeof NextRequest>[1]) => new NextRequest(`http://localhost${url}`, init);
|
||||
|
||||
it('未登录时拒绝读取和创建', async () => {
|
||||
expect((await GET_TAGS(request('/api/tags?subject=math'))).status).toBe(401);
|
||||
|
||||
Reference in New Issue
Block a user