From a0c40f57b940134a061d2fbf19c2b5bb90bf4c2a Mon Sep 17 00:00:00 2001 From: BlowaterNostr Date: Mon, 8 Apr 2024 15:59:48 +0800 Subject: [PATCH] more tests --- test.ts | 4 +++- ws.ts | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/test.ts b/test.ts index d94a7fe..afe2e6e 100644 --- a/test.ts +++ b/test.ts @@ -15,6 +15,7 @@ import { } from "./_libs.ts"; import { limit, + newSub_multiple_filters, no_event, } from "https://raw.githubusercontent.com/BlowaterNostr/nostr.ts/main/relay-single-test.ts"; @@ -37,7 +38,7 @@ Deno.test("main", async (t) => { password: "123", port: 8080, default_policy: { - allowed_kinds: "none", + allowed_kinds: [NostrKind.Long_Form], }, kv: await test_kv(), }) as Relay; @@ -143,6 +144,7 @@ Deno.test("main", async (t) => { await t.step("nip1", async () => { await limit(relay.url)(); await no_event(relay.url)(); + await newSub_multiple_filters(relay.url)(); }); await client.close(); diff --git a/ws.ts b/ws.ts index 7aab4dc..e902dad 100644 --- a/ws.ts +++ b/ws.ts @@ -146,7 +146,7 @@ async function handle_cmd_event(args: { respond_ok( event, false, - "this kind is blocked", + `kind ${event.kind} is blocked`, ), ), );