substr/tests/models/article_test.ts
2024-10-21 13:27:33 +02:00

26 lines
605 B
TypeScript

import {
beforeAll,
beforeEach,
describe,
it,
} from "@std/testing/bdd";
import { expect } from "@std/expect";
import { NEvent } from "../../nostr.ts";
import Article from "../../models/article.ts";
describe("User", () => {
let articleEvent: NEvent;
let article: Article;
beforeAll(() => {
articleEvent = JSON.parse(Deno.readTextFileSync("tests/fixtures/article-1.json"));
article = new Article(articleEvent);
});
describe("#identifier", () => {
it("returns the content of the 'd' tag", () => {
expect(article.identifier).toEqual("1726396758485");
});
});
});