1
- import { wirednet } from "./relay-list.test.ts " ;
1
+ import { sleep } from "@blowater/csp " ;
2
2
import { nos } from "./relay-list.test.ts" ;
3
- import { blowater , damus , relays , satlantis } from "./relay-list.test.ts" ;
3
+ import { wirednet } from "./relay-list.test.ts" ;
4
+ import { damus , relays , satlantis } from "./relay-list.test.ts" ;
4
5
import {
5
6
close_sub_keep_reading ,
6
7
get_correct_kind ,
@@ -24,28 +25,31 @@ Deno.test("SingleRelayConnection newSub & close", async () => {
24
25
25
26
Deno . test ( "Single Relay Connection" , async ( t ) => {
26
27
const relay = {
27
- ws_url : damus ,
28
+ ws_url : wirednet ,
28
29
} ;
29
30
await t . step ( "SingleRelayConnection subscription already exists" , sub_exits ( relay . ws_url ) ) ;
31
+ await sleep ( 100 ) ;
30
32
await t . step (
31
33
"SingleRelayConnection: close subscription and keep reading" ,
32
34
close_sub_keep_reading ( relay . ws_url ) ,
33
35
) ;
36
+ await sleep ( 100 ) ;
34
37
await t . step ( "send event" , send_event ( relay . ws_url ) ) ;
38
+ await sleep ( 100 ) ;
35
39
await t . step ( "get_correct_kind" , get_correct_kind ( relay . ws_url ) ) ;
36
-
37
- await t . step ( "multiple filters" , newSub_multiple_filters ( relay . ws_url ) ) ;
38
-
40
+ await sleep ( 100 ) ;
39
41
await t . step ( "limit" , limit ( relay . ws_url ) ) ;
40
-
42
+ await sleep ( 100 ) ;
41
43
await t . step ( "no_event" , no_event ( relay . ws_url ) ) ;
42
-
44
+ await sleep ( 100 ) ;
43
45
await t . step ( "two_clients_communicate" , two_clients_communicate ( relay . ws_url ) ) ;
46
+ } ) ;
47
+
48
+ Deno . test ( "multiple filters" , newSub_multiple_filters ( damus ) ) ;
44
49
45
- await t . step ( "get_event_by_id" , async ( ) => {
46
- await get_event_by_id ( relay . ws_url ) ( ) ;
47
- await get_event_by_id ( nos ) ( ) ;
48
- } ) ;
50
+ Deno . test ( "get_event_by_id" , async ( ) => {
51
+ await get_event_by_id ( wirednet ) ( ) ;
52
+ await get_event_by_id ( damus ) ( ) ;
49
53
} ) ;
50
54
51
55
Deno . test ( "get replaceable event" , async ( ) => {
0 commit comments