mirror of
https://github.com/leon-ai/leon.git
synced 2024-12-19 06:41:33 +03:00
20 lines
565 B
JavaScript
20 lines
565 B
JavaScript
'use strict'
|
|
|
|
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)
|
|
})
|
|
})
|