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

13 lines
441 B
JavaScript

describe('network:speedtest', async () => {
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'])
})
})