forked from boyska/radiomanifest.js
test more things about streaminfo
This commit is contained in:
parent
b21596d1d7
commit
1fba07bd67
1 changed files with 17 additions and 15 deletions
|
@ -3,22 +3,24 @@ const chai = require('chai')
|
||||||
chai.use(require('chai-as-promised'))
|
chai.use(require('chai-as-promised'))
|
||||||
const assert = chai.assert
|
const assert = chai.assert
|
||||||
|
|
||||||
const exampleName = 'empty'
|
|
||||||
const expect = chai.expect
|
const expect = chai.expect
|
||||||
const url = 'https://boyska.degenerazione.xyz/radiomanifest/examples/' + exampleName + '/'
|
const tests = ['empty', 'empty-no-streaminfo', 'empty-invalid-streaminfo']
|
||||||
|
for (var exampleName of tests) {
|
||||||
|
let url = 'https://boyska.degenerazione.xyz/radiomanifest/examples/' + exampleName + '/'
|
||||||
|
|
||||||
describe('examples/' + exampleName, () => {
|
describe('examples/' + exampleName, () => {
|
||||||
describe('Get radiomanifest', () => {
|
describe('Get radiomanifest', () => {
|
||||||
it('should return a Promise', () => {
|
it('should return a Promise', () => {
|
||||||
const p = radiomanifest.get(url)
|
const p = radiomanifest.get(url)
|
||||||
expect(p instanceof Promise).to.be.eql(true)
|
expect(p instanceof Promise).to.be.eql(true)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('streaming', () => {
|
||||||
|
it('shoud return no streaming option', async () => {
|
||||||
|
const p = await radiomanifest.get(url)
|
||||||
|
expect(p.getStreaming().getOptions().length).to.be.equal(0)
|
||||||
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
}
|
||||||
describe('streaming', () => {
|
|
||||||
it('shoud return no streaming option', async () => {
|
|
||||||
const p = await radiomanifest.get(url)
|
|
||||||
expect(p.getStreaming().getOptions().length).to.be.equal(0)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
Loading…
Reference in a new issue