mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-25 09:44:22 +03:00
18 lines
545 B
JavaScript
18 lines
545 B
JavaScript
describe('videodownloader:youtube', () => {
|
|
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)
|
|
})
|
|
})
|