rss parser
This commit is contained in:
@@ -2,10 +2,23 @@ import { expect, expectTypeOf, test } from "vitest";
|
||||
import Updater from "../src/index.ts";
|
||||
import * as types from "../src/types.ts";
|
||||
|
||||
test("get archive from gitea", async (): Promise<void> => {
|
||||
test("get an atom feed from gitea", async (): Promise<void> => {
|
||||
const updater = new Updater("https://git.emaker.limited/MicrocontrollerCD/SoftwareRelease/releases", "atom");
|
||||
const res = await updater.getArchive();
|
||||
expectTypeOf(res).toBeArray();
|
||||
expectTypeOf(res[0]).toMatchObjectType<types.versionNotes>();
|
||||
expect(res).not.toBe(null);
|
||||
expect(res.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
test("get an rss feed from gitea", async(): Promise<void> => {
|
||||
const updater = new Updater("https://git.emaker.limited/MicrocontrollerCD/SoftwareRelease/releases", "rss");
|
||||
const res = await updater.getArchive();
|
||||
expect(res).not.toBe(null);
|
||||
expect(res.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
test("get an atom feed from github", async (): Promise<void> => {
|
||||
const updater = new Updater("https://github.com/chopster44/Phaser_3_pong/releases", "atom");
|
||||
const res = await updater.getArchive();
|
||||
expect(res).not.toBe(null);
|
||||
expect(res.length).toBeGreaterThan(0);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user