1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-26 18:23:00 +03:00
leon/packages/videodownloader/test/youtube.spec.js
2021-03-03 17:09:31 +08:00

18 lines
551 B
JavaScript

describe('videodownloader:youtube', async () => {
test('requests YouTube', async () => {
global.nlu.brain.execute = jest.fn()
await global.nlu.process('Download new videos from YouTube')
const [obj] = global.nlu.brain.execute.mock.calls
await global.brain.execute(obj[0])
expect(global.brain.interOutput.codes).toIncludeSameMembers(['reaching_playlist'])
expect([
'settings_error',
'request_error',
'nothing_to_download',
'success'
]).toIncludeAnyMembers(global.brain.finalOutput.codes)
})
})