new home: fix tests

This commit is contained in:
boyska 2022-01-29 23:00:37 +01:00
parent ff579acfbb
commit 29d74c1b93
5 changed files with 5 additions and 9 deletions

View file

@ -1,6 +1,6 @@
# Radiomanifest.js
An implementation of the ever-famous [radiomanifest spec](https://boyska.degenerazione.xyz/radiomanifest/)
An implementation of the ever-famous [radiomanifest spec](https://radiomanifest.degenerazione.xyz//)
available as a Node module, a browser module, or an ugly-but-works UMD that exports a "radiomanifest" global.
@ -13,6 +13,6 @@ npm run test
## Supported spec
- [radiomanifest](https://boyska.degenerazione.xyz/radiomanifest/)
- [radiomanifest](https://radiomanifest.degenerazione.xyz/)
- [stream-meta v2](https://www.stream-meta.info/version_2_files.html): name of the radio is extracted from `/streaminfo.json`

View file

@ -8,13 +8,10 @@ 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;
expect(p).to.be.rejected
})
})
})

View file

@ -6,7 +6,7 @@ const assert = chai.assert
const expect = chai.expect
const tests = ['empty', 'empty-no-streaminfo', 'empty-invalid-streaminfo']
for (var exampleName of tests) {
let url = 'https://boyska.degenerazione.xyz/radiomanifest/examples/' + exampleName + '/'
let url = 'https://radiomanifest.degenerazione.xyz/v0.2/examples/' + exampleName + '/'
describe('examples/' + exampleName, () => {
describe('Get radiomanifest', () => {

View file

@ -5,7 +5,7 @@ const assert = chai.assert
const exampleName = 'source404'
const expect = chai.expect
const url = 'https://boyska.degenerazione.xyz/radiomanifest/examples/' + exampleName + '/'
const url = 'https://radiomanifest.degenerazione.xyz/v0.2/examples/' + exampleName + '/'
describe('examples/' + exampleName, () => {
describe('streaming', () => {

1
ui.js
View file

@ -1,7 +1,6 @@
// const radiomanifest = require('radiomanifest.js')
async function fai () {
const radio = await radiomanifest.get('http://www.ondarossa.info/')
// var radio = await get("https://boyska.degenerazione.xyz/radiomanifest/examples/empty/")
console.log('radio?', radio)
const s = radio.getStreaming()
console.log(s.sources)