forked from Outils-PeerTube/listener-rss-aggregator
issue 4 and 5
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
import { ListenerRss, ListenerRSSInfos } from "listener-rss";
|
||||
|
||||
// local lib
|
||||
import { ManageListener } from "../src/";
|
||||
import { ListenerRssAggregator } from "../src/";
|
||||
|
||||
// Unit test
|
||||
import { join as joinPath } from "path";
|
||||
@ -29,14 +29,14 @@ describe("test class ManageListener", function () {
|
||||
it("should save the inserted objects", async function () {
|
||||
await withFile(async ({ path }) => {
|
||||
// given
|
||||
const ml = new ManageListener(path);
|
||||
const ml = new ListenerRssAggregator(path);
|
||||
await ml.load();
|
||||
|
||||
for (const item of dataWithoutHistory) await ml.registerListener(item);
|
||||
|
||||
// when
|
||||
ml.save();
|
||||
const ml_bis = new ManageListener(path);
|
||||
const ml_bis = new ListenerRssAggregator(path);
|
||||
await ml_bis.load();
|
||||
|
||||
// expect
|
||||
@ -60,7 +60,7 @@ describe("test class ManageListener", function () {
|
||||
await withFile(async ({ path }) => {
|
||||
// given
|
||||
const clock = sinon.useFakeTimers();
|
||||
const ml = new ManageListener(path);
|
||||
const ml = new ListenerRssAggregator(path);
|
||||
await ml.load();
|
||||
for (const item of dataWithoutHistory) await ml.registerListener(item);
|
||||
|
||||
@ -150,7 +150,7 @@ describe("test class ManageListener", function () {
|
||||
await withFile(async ({ path }) => {
|
||||
// given
|
||||
const clock = sinon.useFakeTimers();
|
||||
const ml = new ManageListener(path);
|
||||
const ml = new ListenerRssAggregator(path);
|
||||
await ml.load();
|
||||
for (const item of dataWithHistory) await ml.registerListener(item);
|
||||
|
||||
|
@ -17,8 +17,8 @@ const dataWithoutHistory = dataWithHistory.map((data) => ({
|
||||
...data,
|
||||
lastEntriesLinks: [],
|
||||
}));
|
||||
describe("test sqlite tools class", () => {
|
||||
it("should create a .db file and fill him", async () => {
|
||||
describe("test sqlite tools class", function () {
|
||||
it("should create a .db file and fill him", async function () {
|
||||
await withFile(async ({ path }) => {
|
||||
// given
|
||||
const dbTools = new SqliteTools(path);
|
||||
@ -37,7 +37,7 @@ describe("test sqlite tools class", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("should update the values of the databases", async () => {
|
||||
it("should update the values of the databases", async function () {
|
||||
await withFile(async ({ path }) => {
|
||||
// given
|
||||
const dbTools = new SqliteTools(path);
|
||||
|
Reference in New Issue
Block a user