added test's setup

This commit is contained in:
Amaury
2021-03-14 18:18:29 +01:00
parent 77a15bda31
commit 10bc3b9584
4 changed files with 69 additions and 8 deletions

40
test/index-spec.ts Normal file
View 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,
},
];
});