mirror of
https://github.com/tiennm99/ccs.git
synced 2026-10-12 20:15:40 +00:00
test(websearch): assert parser-layer null body errors
This commit is contained in:
1 parent
dff40b5e24
commit
1fd7f81221
1 file changed
+4
-1
@@ -297,9 +297,12 @@ describe('websearch routes', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it('rejects primitive JSON null bodies before route validation', async () => {
|
it('rejects primitive JSON null bodies at the JSON parser layer', async () => {
|
||||||
const response = await putWebsearch('null');
|
const response = await putWebsearch('null');
|
||||||
|
|
||||||
expect(response.status).toBe(400);
|
expect(response.status).toBe(400);
|
||||||
|
expect(response.headers.get('content-type')).toContain('text/html');
|
||||||
|
expect(await response.text()).toContain('SyntaxError');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('rejects unsupported API key providers', async () => {
|
it('rejects unsupported API key providers', async () => {
|
||||||
|
|||||||
Reference in new issue
Block a user