From e5fa7fc3a22a9e0195ad206b7e70c5ba7404e30f Mon Sep 17 00:00:00 2001 From: boyska Date: Thu, 25 Nov 2021 22:33:06 +0100 Subject: [PATCH] tests for error 404 --- test/404.test.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 test/404.test.js diff --git a/test/404.test.js b/test/404.test.js new file mode 100644 index 0000000..b8a1deb --- /dev/null +++ b/test/404.test.js @@ -0,0 +1,20 @@ +const radiomanifest = require('../radiomanifest.js') +const chai = require('chai') +chai.use(require('chai-as-promised')) +const assert = chai.assert + +const expect = chai.expect +const testName = 'idontexist' +const url = 'https://example.org/radiomanifest/examples/' + testName + '/' + +describe('radiomanifest.js supports example ' + testName, () => { + + describe('Get empty radiomanifest', () => { + it('should throw', () => { + const p = radiomanifest.get(url) + expect(p).to.be.rejected; + }) + }) + +}) +