1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-09-20 14:27:40 +03:00

test(server): refactor fallbacks query

This commit is contained in:
Louistiti 2019-03-13 08:47:18 +08:00
parent fdbb90ae05
commit c263466a5d

View File

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