Syntax changes in front and back end dirs. These do not affect functionality and are purely intended to better capture and describe the app's functionality and purpose
This commit is contained in:
@@ -16,7 +16,7 @@ describe('sendQuery', () => {
|
||||
vi.restoreAllMocks();
|
||||
});
|
||||
|
||||
it('sends POST to /api/query with notebookId and question', async () => {
|
||||
it('sends POST to /api/query with sourceCorpusId and question', async () => {
|
||||
const data = { answer: 'The answer', citations: [] };
|
||||
fetch.mockResolvedValue(okResponse(data));
|
||||
|
||||
@@ -25,7 +25,7 @@ describe('sendQuery', () => {
|
||||
expect(fetch).toHaveBeenCalledWith('/api/query', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ notebookId: 'nb-1', question: 'What is AI?' }),
|
||||
body: JSON.stringify({ sourceCorpusId: 'nb-1', question: 'What is AI?' }),
|
||||
});
|
||||
expect(result).toEqual(data);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user