substr/tests/nostr_test.ts
2024-10-28 15:01:17 +01:00

28 lines
983 B
TypeScript

// import { describe, it } from "@std/testing/bdd";
// import { stub } from "@std/testing/mock";
// import { expect } from "@std/expect";
// import { NostrEvent, NostrFilter } from "@nostrify/nostrify";
// import * as nostr from "../nostr.ts";
//
// async function fetchWithTimeout(filters: NostrFilter[]) {
// console.log("================")
// const events = [];
// const fixtures = [ "article-1.json", "article-deleted.json" ]
// for (const filename of fixtures) {
// const event = JSON.parse(Deno.readTextFileSync(`tests/fixtures/${filename}`));
// events.push(event);
// }
// return Promise.resolve(events);
// }
//
// describe("Nostr", () => {
// describe("#fetchArticlesByAuthor", () => {
// it("removes the anchor links for headlines", async () => {
// stub(nostr, "fetchArticlesByAuthor");
//
// const articles = await nostr.fetchArticlesByAuthor("123456abcdef");
// expect(articles.length).toEqual(2);
// });
// });
// });