Dev Build / cleanup (push) Canceled after 0s
Dev Build / typecheck (push) Canceled after 0s
Dev Build / build (linux-arm64, ubuntu-24.04-arm, linux-arm64) (push) Canceled after 0s
Dev Build / build (linux-x64, ubuntu-latest, linux-x64) (push) Canceled after 0s
Dev Build / build (win-x64, windows-latest, win32-x64) (push) Canceled after 0s
Dev Build / dispatch-dev-docker (push) Canceled after 0s
38 lines
1004 B
Plaintext
38 lines
1004 B
Plaintext
import fs from "node:fs/promises";
|
|
import { describe, it, expect } from "vitest";
|
|
import { parseFeed } from "./index.js";
|
|
|
|
const documents = new URL("__fixtures__/Documents/", import.meta.url);
|
|
|
|
describe("parseFeed", () => {
|
|
it("(rssFeed)", async () =>
|
|
expect(
|
|
parseFeed(
|
|
await fs.readFile(
|
|
new URL("RSS_Example.xml", documents),
|
|
"utf8",
|
|
),
|
|
),
|
|
).toMatchSnapshot());
|
|
|
|
it("(atomFeed)", async () =>
|
|
expect(
|
|
parseFeed(
|
|
await fs.readFile(
|
|
new URL("Atom_Example.xml", documents),
|
|
"utf8",
|
|
),
|
|
),
|
|
).toMatchSnapshot());
|
|
|
|
it("(rdfFeed)", async () =>
|
|
expect(
|
|
parseFeed(
|
|
await fs.readFile(
|
|
new URL("RDF_Example.xml", documents),
|
|
"utf8",
|
|
),
|
|
),
|
|
).toMatchSnapshot());
|
|
});
|