1
1
mirror of https://github.com/leon-ai/leon.git synced 2024-12-25 17:54:43 +03:00
leon/packages/videodownloader/test/youtube.spec.js

18 lines
545 B
JavaScript
Raw Normal View History

2021-12-27 13:37:42 +03:00
describe('videodownloader:youtube', () => {
2019-02-10 15:26:50 +03:00
test('requests YouTube', async () => {
global.nlu.brain.execute = jest.fn()
await global.nlu.process('Download new videos from YouTube')
2019-02-10 15:26:50 +03:00
const [obj] = global.nlu.brain.execute.mock.calls
await global.brain.execute(obj[0])
expect(global.brain.interOutput.codes).toIncludeSameMembers(['reaching_playlist'])
expect([
2019-02-10 15:26:50 +03:00
'settings_error',
'request_error',
'nothing_to_download',
'success'
]).toIncludeAnyMembers(global.brain.finalOutput.codes)
2019-02-10 15:26:50 +03:00
})
})