From 10f2e4acdd5704458815b32a7513b3d8f3655e9d Mon Sep 17 00:00:00 2001 From: boyska Date: Fri, 19 Nov 2021 17:03:46 +0100 Subject: [PATCH] buggy test: empty --- test/example-empty.test.js | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 test/example-empty.test.js diff --git a/test/example-empty.test.js b/test/example-empty.test.js new file mode 100644 index 0000000..ce0da04 --- /dev/null +++ b/test/example-empty.test.js @@ -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) } + ) + }) + }) +})