1
0
Fork 0
radiomanifest.js/test/example-empty.test.js
2021-11-19 17:03:46 +01:00

27 lines
747 B
JavaScript

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) }
)
})
})
})