radiomanifest.js/test/example-empty.test.js
boyska 07bba1a18f fixed test
now it fails, but giving a correct failure!
2021-11-19 17:12:28 +01:00

23 lines
690 B
JavaScript

const radiomanifest = require('../radiomanifest.js')
const chai = require('chai')
chai.use(require('chai-as-promised'))
const assert = chai.assert
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', async () => {
const p = await radiomanifest.get(url)
assert.equal(p.getStreaming().getOptions().length, 0)
})
})
})