Include home relay in generated naddr

This commit is contained in:
2024-10-22 15:54:22 +02:00
parent ce469bc37f
commit a0f0b06ad2
2 changed files with 20 additions and 3 deletions

View File

@@ -20,6 +20,18 @@ describe("Article", () => {
});
});
describe("#isDraft", () => {
it("is false when kind is 30023", () => {
expect(article.isDraft).toBe(false);
});
it("is true when kind is 30024", () => {
article.event.kind = 30024;
expect(article.isDraft).toBe(true);
article.event.kind = 30023;
});
});
describe("#title", () => {
it("returns the content of the 'title' tag", () => {
expect(article.title).toMatch(
@@ -53,9 +65,9 @@ describe("Article", () => {
});
describe("#naddr", () => {
it("returns bech32 addressable event ID", () => {
expect(article.naddr).toEqual(
"naddr1qvzqqqr4gupzq8meqkx80g3yuklzymy0qfx2ekk56aqc2ht4ak03z3em4r4cdcwtqqxnzdejxcenjd3hx5urgwp4676hkz",
it("returns a bech32 addressable event ID", () => {
expect(article.naddr).toMatch(
/naddr1qvzqqqr4gupzq8meqkx80g3yuklzymy0qf/,
);
});
});