1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-20 07:11:40 +03:00
leon/packages/network/test/speedtest.spec.js

13 lines
435 B
JavaScript
Raw Normal View History

2021-12-27 13:37:42 +03:00
describe('network:speedtest', () => {
test('does a speed test', async () => {
global.nlu.brain.execute = jest.fn()
await global.nlu.process('Do a speed test')
const [obj] = global.nlu.brain.execute.mock.calls
await global.brain.execute(obj[0])
expect(global.brain.finalOutput.speech.split('</li>').length - 1).toBe(3)
expect(global.brain.finalOutput.codes).toIncludeSameMembers(['testing', 'done'])
})
})