forked from boyska/radiomanifest.js
tests for error 404
This commit is contained in:
parent
e9dc76c470
commit
e5fa7fc3a2
1 changed files with 20 additions and 0 deletions
20
test/404.test.js
Normal file
20
test/404.test.js
Normal file
|
@ -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;
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in a new issue