mirror of
https://github.com/leon-ai/leon.git
synced 2025-01-01 21:26:08 +03:00
test(server): refactor fallbacks query
This commit is contained in:
parent
fdbb90ae05
commit
c263466a5d
@ -56,7 +56,7 @@ describe('NLU', () => {
|
||||
Nlu.fallback = jest.fn(() => fallbackObj)
|
||||
|
||||
await nlu.loadModel(global.paths.classifier)
|
||||
expect(await nlu.process('This is a query example to test fallbacks')).toBeTruthy()
|
||||
expect(await nlu.process('Thisisaqueryexampletotestfallbacks')).toBeTruthy()
|
||||
expect(nlu.brain.execute.mock.calls[0][0]).toBe(fallbackObj)
|
||||
Nlu.fallback = nluFallbackTmp // Need to give back the real fallback method
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user