radiomanifest.js/test/radiomanifest.test.js

24 lines
654 B
JavaScript
Raw Permalink Normal View History

2023-09-14 01:07:07 +02:00
const radiomanifest = require("../radiomanifest.js");
const chai = require("chai");
chai.use(require("chai-as-promised"));
2021-11-18 15:35:32 +01:00
2023-09-14 01:07:07 +02:00
const expect = chai.expect;
2021-11-18 15:35:32 +01:00
2023-09-14 01:07:07 +02:00
describe("radiomanifest.js", () => {
describe("Get a radiomanifest", () => {
it("should return a Promise", () => {
const p = radiomanifest.get("http://example.com/");
expect(p instanceof Promise).to.be.eql(true);
});
2021-11-18 15:35:32 +01:00
2023-09-14 01:07:07 +02:00
it("should reject on invalid URL", () => {
const p = radiomanifest.get("http://example.com/");
expect(p).to.eventually.be.rejected;
});
});
2021-11-18 15:35:32 +01:00
2023-09-14 01:07:07 +02:00
describe("streaming", () => {
it("shoud return a valid streaming URL", () => {});
});
});