mirror of
https://github.com/hexastack/hexabot
synced 2025-06-26 18:27:28 +00:00
fix(api): apply feedback
This commit is contained in:
parent
de8615bf3a
commit
9be40457a1
@ -234,10 +234,10 @@ describe('NlpEntityRepository', () => {
|
|||||||
nlpEntityRepository.eventEmitter.once(
|
nlpEntityRepository.eventEmitter.once(
|
||||||
'hook:nlpEntity:postUpdate',
|
'hook:nlpEntity:postUpdate',
|
||||||
async (...[query, updated]) => {
|
async (...[query, updated]) => {
|
||||||
const spy1 = jest.spyOn(llmNluHelper, 'updateEntity');
|
jest.spyOn(llmNluHelper, 'updateEntity');
|
||||||
await nlpService.handleEntityPostUpdate(query, updated);
|
await nlpService.handleEntityPostUpdate(query, updated);
|
||||||
|
|
||||||
expect(spy1).toHaveBeenCalledWith(updated);
|
expect(llmNluHelper.updateEntity).toHaveBeenCalledWith(updated);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -256,10 +256,10 @@ describe('NlpValueRepository', () => {
|
|||||||
nlpValueRepository.eventEmitter.once(
|
nlpValueRepository.eventEmitter.once(
|
||||||
'hook:nlpValue:postUpdate',
|
'hook:nlpValue:postUpdate',
|
||||||
async (...[query, updated]) => {
|
async (...[query, updated]) => {
|
||||||
const spy1 = jest.spyOn(llmNluHelper, 'updateValue');
|
jest.spyOn(llmNluHelper, 'updateValue');
|
||||||
await nlpService.handleValuePostUpdate(query, updated);
|
await nlpService.handleValuePostUpdate(query, updated);
|
||||||
|
|
||||||
expect(spy1).toHaveBeenCalledWith(updated);
|
expect(llmNluHelper.updateValue).toHaveBeenCalledWith(updated);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user