fix(api): apply feedback

This commit is contained in:
yassinedorbozgithub 2025-06-17 15:34:17 +01:00
parent de8615bf3a
commit 9be40457a1
2 changed files with 4 additions and 4 deletions

View File

@ -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);
}, },
); );

View File

@ -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);
}, },
); );