Skip to content

Commit 0d5b1c1

Browse files
committed
add namedgroup test
1 parent 2fe4278 commit 0d5b1c1

File tree

4 files changed

+13
-6
lines changed

4 files changed

+13
-6
lines changed

test/extensiontype_test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,3 @@ for (const e of codes) {
88
const parse = ExtensionType.parse(new Uint8Array([Math.floor(e / 256), e % 256]))
99
console.log(`name: ${parse.name} value: ${parse.value}`)
1010
}
11-
12-
debugger;

test/handshaketype_test.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,9 @@ import { HandshakeType } from "../src/handshaketype.js";
33
console.log(HandshakeType.CLIENT_HELLO);
44
console.log(HandshakeType.CLIENT_HELLO)
55

6-
const codes = [1,2,4,5,8,11,13,15,20,24,254]
7-
for (const e of codes){
6+
const codes = [1, 2, 4, 5, 8, 11, 13, 15, 20, 24, 254]
7+
for (const e of codes) {
88
const parse = HandshakeType.parse(new Uint8Array([e]))
99
console.log(`name: ${parse.name} value: ${parse.value}`)
1010
}
1111

12-
debugger;

test/namedgroup_test.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { assertEquals } from "jsr:@std/assert";
2+
import { NamedGroup } from "../src/namedgroup.js";
3+
4+
Deno.test(
5+
"NamedGroup",
6+
()=>{
7+
const namedGroups = [23, 24, 25, 29, 30, 256, 257, 258, 259, 260]
8+
assertEquals(NamedGroup.values().map(e=>e.value), namedGroups);
9+
}
10+
)
11+

test/signaturescheme_test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,3 @@ for (const e of codes) {
99
console.log(`name: ${parse.name} value: ${parse.value}`)
1010
}
1111

12-
debugger;

0 commit comments

Comments
 (0)