forked from Outils-PeerTube/listener-rss-aggregator
added test's setup
This commit is contained in:
40
test/index-spec.ts
Normal file
40
test/index-spec.ts
Normal file
@ -0,0 +1,40 @@
|
||||
// external lib
|
||||
import { ListenerRss, ListenerRSSInfos } from "listener-rss/src/";
|
||||
|
||||
// local lib
|
||||
import { GestionListener } from "/src/index";
|
||||
|
||||
// Unit test
|
||||
import * as chai from "chai";
|
||||
import sinon from "ts-sinon";
|
||||
import sinonChai from "sinon-chai";
|
||||
import { ImportMock, InPlaceMockManager } from "ts-mock-imports";
|
||||
|
||||
chai.use(sinonChai);
|
||||
|
||||
const expect = chai.expect;
|
||||
|
||||
describe("test class GestionListener", function () {
|
||||
const listenerInfoArray: ListenerRSSInfos[] = [
|
||||
{
|
||||
name: "service1",
|
||||
address: "fake.rss.service1",
|
||||
timeloop: 45,
|
||||
},
|
||||
{
|
||||
name: "service2",
|
||||
address: "fake.rss.service2",
|
||||
timeloop: 30,
|
||||
},
|
||||
{
|
||||
name: "service3",
|
||||
address: "fake.rss.service3",
|
||||
timeloop: 15,
|
||||
},
|
||||
{
|
||||
name: "service4",
|
||||
address: "fake.rss.service4",
|
||||
timeloop: 60,
|
||||
},
|
||||
];
|
||||
});
|
Reference in New Issue
Block a user