forked from boyska/radiomanifest.js
buggy test: empty
This commit is contained in:
parent
64b5446433
commit
10f2e4acdd
1 changed files with 27 additions and 0 deletions
27
test/example-empty.test.js
Normal file
27
test/example-empty.test.js
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
const radiomanifest = require('../radiomanifest.js')
|
||||||
|
const chai = require('chai')
|
||||||
|
chai.use(require('chai-as-promised'))
|
||||||
|
|
||||||
|
const expect = chai.expect
|
||||||
|
const url = 'https://boyska.degenerazione.xyz/radiomanifest/examples/empty/'
|
||||||
|
|
||||||
|
describe('radiomanifest.js', () => {
|
||||||
|
describe('Get empty radiomanifest', () => {
|
||||||
|
it('should return a Promise', () => {
|
||||||
|
const p = radiomanifest.get(url)
|
||||||
|
expect(p instanceof Promise).to.be.eql(true)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
describe('streaming', () => {
|
||||||
|
it('shoud return no streaming option', () => {
|
||||||
|
const p = radiomanifest.get(url)
|
||||||
|
p.then(
|
||||||
|
function (r) {
|
||||||
|
r.getStreaming().getOptions().length.should.equal(0)
|
||||||
|
},
|
||||||
|
function (err) { done(err) }
|
||||||
|
)
|
||||||
|
})
|
||||||
|
})
|
||||||
|
})
|
Loading…
Reference in a new issue