Profile / Thread styles
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
@ -18,7 +18,7 @@ app.use("/", (req: express.Request, res: express.Response) => {
|
||||
.readdirSync(path.join(__dirname, "..", "..", "dist", "test"))
|
||||
.filter(
|
||||
(f) =>
|
||||
f.startsWith("test.") && !f.endsWith(".map") && !f.endsWith(".d.ts")
|
||||
f.startsWith("test.") && !f.endsWith(".map") && !f.endsWith(".d.ts"),
|
||||
)
|
||||
.map((src) => `<script src="${src}"></script>`)
|
||||
.join("\n")
|
||||
|
@ -30,7 +30,7 @@ export interface Setup {
|
||||
|
||||
export async function setup(
|
||||
done: (e?: unknown) => void,
|
||||
test: (setup: Setup) => void | Promise<void>
|
||||
test: (setup: Setup) => void | Promise<void>,
|
||||
) {
|
||||
try {
|
||||
await restartRelay()
|
||||
@ -55,7 +55,7 @@ export async function setup(
|
||||
const { data, iv } = await aesEncryptBase64(
|
||||
parsePrivateKey(publisherSecret),
|
||||
pubkey,
|
||||
plaintext
|
||||
plaintext,
|
||||
)
|
||||
return `${data}?iv=${iv}`
|
||||
},
|
||||
@ -67,7 +67,7 @@ export async function setup(
|
||||
{
|
||||
data,
|
||||
iv,
|
||||
}
|
||||
},
|
||||
)
|
||||
},
|
||||
},
|
||||
|
@ -52,7 +52,7 @@ describe("deletion", () => {
|
||||
// After the text note has been published, delete it.
|
||||
const deletion = await createDeletion(
|
||||
{ events: [textNoteId] },
|
||||
publisherSecret
|
||||
publisherSecret,
|
||||
)
|
||||
deletionId = deletion.id
|
||||
publisher.publish({
|
||||
@ -66,7 +66,7 @@ describe("deletion", () => {
|
||||
subscriber.subscribe([])
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
})
|
||||
|
@ -34,16 +34,16 @@ describe("direct-message", () => {
|
||||
if (event.kind === EventKind.DirectMessage) {
|
||||
assert.strictEqual(
|
||||
event.getRecipient(),
|
||||
parsePublicKey(subscriberPubkey)
|
||||
parsePublicKey(subscriberPubkey),
|
||||
)
|
||||
assert.strictEqual(
|
||||
await event.getMessage(subscriberSecret),
|
||||
message
|
||||
message,
|
||||
)
|
||||
}
|
||||
|
||||
done()
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
const subscriptionId = subscriber.subscribe([])
|
||||
@ -54,11 +54,11 @@ describe("direct-message", () => {
|
||||
message,
|
||||
recipient: subscriberPubkey,
|
||||
},
|
||||
publisherSecret
|
||||
publisherSecret,
|
||||
)
|
||||
publisher.publish(event)
|
||||
})
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
@ -92,11 +92,11 @@ describe("direct-message", () => {
|
||||
if (event.kind === EventKind.DirectMessage) {
|
||||
assert.strictEqual(
|
||||
event.getRecipient(),
|
||||
parsePublicKey(recipientPubkey)
|
||||
parsePublicKey(recipientPubkey),
|
||||
)
|
||||
assert.strictEqual(
|
||||
await event.getMessage(subscriberSecret),
|
||||
undefined
|
||||
undefined,
|
||||
)
|
||||
}
|
||||
|
||||
@ -104,7 +104,7 @@ describe("direct-message", () => {
|
||||
} catch (e) {
|
||||
done(e)
|
||||
}
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
const subscriptionId = subscriber.subscribe([])
|
||||
@ -116,11 +116,11 @@ describe("direct-message", () => {
|
||||
message,
|
||||
recipient: recipientPubkey,
|
||||
},
|
||||
publisherSecret
|
||||
publisherSecret,
|
||||
)
|
||||
publisher.publish(event)
|
||||
})
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
})
|
||||
|
@ -34,7 +34,7 @@ describe("internet-identifier", () => {
|
||||
picture: "",
|
||||
nip05: "bob@localhost:12647",
|
||||
},
|
||||
publisherSecret
|
||||
publisherSecret,
|
||||
)),
|
||||
})
|
||||
})
|
||||
@ -66,7 +66,7 @@ describe("internet-identifier", () => {
|
||||
name: "",
|
||||
picture: "",
|
||||
},
|
||||
publisherSecret
|
||||
publisherSecret,
|
||||
)),
|
||||
})
|
||||
})
|
||||
|
@ -16,7 +16,7 @@ describe("relay info", () => {
|
||||
assert.ok((relay.info.supported_nips?.length ?? 0) > 0)
|
||||
assert.strictEqual(
|
||||
relay.info.software,
|
||||
"https://git.sr.ht/~gheartsfield/nostr-rs-relay"
|
||||
"https://git.sr.ht/~gheartsfield/nostr-rs-relay",
|
||||
)
|
||||
assert.strictEqual(relay.info.version, "0.8.8")
|
||||
}
|
||||
|
@ -43,12 +43,12 @@ describe("set metadata", () => {
|
||||
publisher.publish({
|
||||
...(await createSetMetadata(
|
||||
{ name, about, picture },
|
||||
publisherSecret
|
||||
publisherSecret,
|
||||
)),
|
||||
created_at: timestamp,
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
})
|
||||
|
@ -30,7 +30,7 @@ describe("text note", () => {
|
||||
assert.strictEqual(event.content, note)
|
||||
assert.strictEqual(actualSubscriptionId, subscriptionId)
|
||||
done()
|
||||
}
|
||||
},
|
||||
)
|
||||
|
||||
const subscriptionId = subscriber.subscribe([])
|
||||
@ -45,7 +45,7 @@ describe("text note", () => {
|
||||
created_at: timestamp,
|
||||
})
|
||||
})
|
||||
}
|
||||
},
|
||||
)
|
||||
})
|
||||
|
||||
|
Reference in New Issue
Block a user