mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-21 07:41:39 +03:00
21 lines
550 B
JavaScript
21 lines
550 B
JavaScript
'use strict'
|
|
|
|
describe('trend:github', async () => {
|
|
test('forces limit', async () => {
|
|
global.nlu.brain.execute = jest.fn()
|
|
await global.nlu.process('Give me the 30 latest trends on GitHub')
|
|
|
|
const [obj] = global.nlu.brain.execute.mock.calls
|
|
await global.brain.execute(obj[0])
|
|
|
|
console.log(global.brain.finalOutput)
|
|
|
|
expect(global.brain.finalOutput.speech.split('</li>').length - 1).toBe(25)
|
|
expect(global.brain.finalOutput.codes).toIncludeSameMembers([
|
|
'limit_max',
|
|
'reaching',
|
|
'done'
|
|
])
|
|
})
|
|
})
|