From 07bba1a18f830989f6041d04bedaeb62b4d9b04f Mon Sep 17 00:00:00 2001 From: boyska Date: Fri, 19 Nov 2021 17:12:28 +0100 Subject: [PATCH] fixed test now it fails, but giving a correct failure! --- test/example-empty.test.js | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/example-empty.test.js b/test/example-empty.test.js index ce0da04..9be5624 100644 --- a/test/example-empty.test.js +++ b/test/example-empty.test.js @@ -1,6 +1,7 @@ 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/' @@ -14,14 +15,9 @@ describe('radiomanifest.js', () => { }) 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) } - ) + it('shoud return no streaming option', async () => { + const p = await radiomanifest.get(url) + assert.equal(p.getStreaming().getOptions().length, 0) }) }) })