forked from boyska/radiomanifest.js
new tests for source404
This commit is contained in:
parent
86c58fc39d
commit
cec6cb9101
1 changed files with 23 additions and 0 deletions
23
test/example-source404.test.js
Normal file
23
test/example-source404.test.js
Normal file
|
@ -0,0 +1,23 @@
|
|||
const radiomanifest = require('../radiomanifest.js')
|
||||
const chai = require('chai')
|
||||
chai.use(require('chai-as-promised'))
|
||||
const assert = chai.assert
|
||||
|
||||
const exampleName = 'source404'
|
||||
const expect = chai.expect
|
||||
const url = 'https://boyska.degenerazione.xyz/radiomanifest/examples/' + exampleName + '/'
|
||||
|
||||
describe('examples/' + exampleName, () => {
|
||||
describe('streaming', () => {
|
||||
it('shoud return one streaming option', async () => {
|
||||
const p = await radiomanifest.get(url)
|
||||
assert.equal(p.getStreaming().getOptions().length, 1)
|
||||
})
|
||||
it('... whose url is stream.m3u', async () => {
|
||||
const p = await radiomanifest.get(url)
|
||||
assert.equal(p.getStreaming().getOptions()[0], 'try to find me')
|
||||
const name = p.getStreaming().getOptions()[0]
|
||||
assert.equal(p.getStreaming().getSource(name), 'https://www.radioexample.org/stream.m3u')
|
||||
})
|
||||
})
|
||||
})
|
Loading…
Reference in a new issue