1
1
import { describe , it } from "../lib/std/testing.ts" ;
2
2
import { assert } from "../lib/std/assert.ts" ;
3
- import { env } from "../lib/env.ts" ;
4
3
import { EventInit } from "../lib/events.ts" ;
4
+ import type { PublicKey } from "../mod.ts" ;
5
5
import "./02.ts" ;
6
6
7
7
describe ( "EventInit<3>" , ( ) => {
@@ -10,7 +10,7 @@ describe("EventInit<3>", () => {
10
10
kind : 3 ,
11
11
content : "" ,
12
12
tags : [
13
- [ "p" , env . PUBLIC_KEY , "wss://nos.lol" , "string" ] ,
13
+ [ "p" , "test" as PublicKey , "wss://nos.lol" , "string" ] ,
14
14
] ,
15
15
} satisfies EventInit < 3 > ;
16
16
assert ( init ) ;
@@ -21,7 +21,7 @@ describe("EventInit<3>", () => {
21
21
content : "" ,
22
22
tags : [
23
23
// @ts -expect-error: tag name should be "p"
24
- [ "e" , env . PUBLIC_KEY , "wss://nos.lol" , "string" ] ,
24
+ [ "e" , "test" as PublicKey , "wss://nos.lol" , "string" ] ,
25
25
] ,
26
26
} satisfies EventInit < 3 > ;
27
27
assert ( init ) ;
@@ -32,7 +32,7 @@ describe("EventInit<3>", () => {
32
32
// @ts -expect-error: content should be empty string
33
33
content : "string" ,
34
34
tags : [
35
- [ "p" , env . PUBLIC_KEY , "wss://nos.lol" , "string" ] ,
35
+ [ "p" , "test" as PublicKey , "wss://nos.lol" , "string" ] ,
36
36
] ,
37
37
} satisfies EventInit < 3 > ;
38
38
assert ( init ) ;
0 commit comments