test: remove outdated test

This commit is contained in:
Louis 2024-11-09 12:21:51 +07:00
parent 4a414bf5e9
commit 487fd27912
No known key found for this signature in database
GPG Key ID: 44FA9F4D33C37DE2

View File

@ -220,22 +220,6 @@ describe('builder helper functions', () => {
}) })
describe('chatCompletions', () => { describe('chatCompletions', () => {
it('should return an error if model is not found', async () => {
const request = { body: { model: 'nonexistentModel' } }
const reply = { code: jest.fn().mockReturnThis(), send: jest.fn() }
await chatCompletions(request, reply)
expect(reply.code).toHaveBeenCalledWith(404)
expect(reply.send).toHaveBeenCalledWith({
error: {
message: 'The model nonexistentModel does not exist',
type: 'invalid_request_error',
param: null,
code: 'model_not_found',
},
})
})
it('should return the error on status not ok', async () => { it('should return the error on status not ok', async () => {
const request = { body: { model: 'model1' } } const request = { body: { model: 'model1' } }
const mockSend = jest.fn() const mockSend = jest.fn()