gui/ui/node_modules.bak/htmlparser2/src/FeedHandler.spec.ts
Snider fad16c8c76
Some checks failed
Security Scan / security (push) Failing after 34s
Test / test (push) Failing after 1m44s
chore: sync workspace dependencies
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-15 15:44:56 +00:00

37 lines
1,004 B
TypeScript

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());
});