replace some type specification from any to more accurate and adding more comments

This commit is contained in:
2021-02-25 14:02:02 +01:00
parent 960d754604
commit 7d404c3ea9
2 changed files with 30 additions and 14 deletions

View File

@ -34,8 +34,9 @@ describe("test class RSS: jsonfile", function () {
let stubListener: sinon.StubbedInstance<Listeners>;
let stubParser: sinon.StubbedInstance<Parser>;
const mockedRSSOutput: any = {
// TODO any = pas bien
const mockedRSSOutput: Parser.Output<{
"media:group": { [key: string]: string | [any] };
}> = {
items: [
{
title: "my title 00",
@ -96,7 +97,7 @@ describe("test class RSS: jsonfile", function () {
}
});
stubListener.setParser();
stubListener.fetchRSS.resolves(stubParser.parseURL(stubListener.address));
stubListener.fetchRSS.returns(stubParser.parseURL(stubListener.address));
} else throw new Error("myListener need to be initiliaze before the stub");
};