Skip to content

Commit 38aa228

Browse files
committed
clean test and lint
1 parent df8d559 commit 38aa228

File tree

8 files changed

+4
-31
lines changed

8 files changed

+4
-31
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tls/enum",
3-
"version": "0.6.1",
3+
"version": "0.6.2",
44
"exports": "./src/mod.ts",
55
"publish": {
66
"exclude": ["dist/"]

src/namedgroup.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44
import { p256, p384, p521, x25519, x448, Uint16, Constrained, Struct } from "./dep.ts";
55
import { Enum } from "./enum.js";
6-
import { parseItems } from "./utils.js";
76

87
/**
98
* Supported groups - @see https://datatracker.ietf.org/doc/html/rfc8446#section-4.2.7.

src/pskmode.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
// deno-lint-ignore-file no-slow-types
22
// @ts-self-types="../type/pskmode.d.ts"
33

4-
import { Constrained, Uint8 } from "./dep.ts";
54
import { Enum } from "./enum.js";
6-
import { parseItems } from "./utils.js";
75

86
/**
97
* PskKeyExchangeMode - @see https://datatracker.ietf.org/doc/html/rfc8446#section-4.4.2

src/signaturescheme.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { Constrained, Struct, Uint16 } from "./dep.ts";
55
import { Enum } from "./enum.js";
66
import { sha256, sha384, sha512 } from "@noble/hashes/sha2"
77
import { HandshakeType } from "./handshaketype.js";
8-
import { parseItems } from "./utils.js";
98

109
/**
1110
* Enumeration of signature schemes as defined in RFC 8446.

src/version.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22
// @ts-self-types="../type/version.d.ts"
33

44
import { Enum } from "./enum.js";
5-
import { Constrained, Uint16 } from "./dep.ts";
6-
import { parseItems } from "./utils.js";
7-
5+
import { Uint16 } from "./dep.ts";
86

97
/**
108
* Version class representing different protocol versions.

test/namedgroup_test.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { assertEquals } from "jsr:@std/assert";
2-
import { NamedGroup, NamedGroupList } from "../src/namedgroup.js";
2+
import { NamedGroup } from "../src/namedgroup.js";
33

44
Deno.test(
55
"NamedGroup",
@@ -18,10 +18,3 @@ Deno.test(
1818

1919
}
2020
)
21-
22-
23-
Deno.test("NamedGroupList", () => {
24-
const namedGroupList = new NamedGroupList(NamedGroup.X25519, NamedGroup.X448);
25-
const backNGL = NamedGroupList.from(namedGroupList);
26-
assertEquals(namedGroupList.toString(), backNGL.toString())
27-
})

test/signaturescheme_test.js

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { SignatureScheme, CertificateVerify, finished, Finished } from "../src/signaturescheme.js";
22
import { assertEquals } from "jsr:@std/assert";
3-
import { HexaDecimal, sha256 } from "../src/dep.ts";
3+
import { HexaDecimal } from "../src/dep.ts";
44
import { HandshakeType } from "../src/handshaketype.js"
5-
import { SignatureSchemeList } from "../src/signaturescheme.js";
65

76
console.log(SignatureScheme.ED448);
87

@@ -19,17 +18,6 @@ Deno.test("SignatureAlgorithmSchema", () => {
1918
assertEquals(test, back)
2019
})
2120

22-
Deno.test("SignatureSchemeList", ()=>{
23-
const test = new SignatureSchemeList(
24-
SignatureScheme.RSA_PSS_RSAE_SHA256,
25-
SignatureScheme.RSA_PSS_RSAE_SHA384
26-
)
27-
28-
const back = SignatureSchemeList.from(test);
29-
assertEquals(test.toString(), back.toString())
30-
})
31-
32-
3321
const clientHelloMsg = HexaDecimal.fromString(
3422
`01 00 00 c0 03 03 cb 34 ec b1 e7 81 63
3523
ba 1c 38 c6 da cb 19 6a 6d ff a2 1a 8d 99 12 ec 18 a2 ef 62 83

test/version_test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// Import your classes
2-
import { Versions } from "../src/version.js";
32
import { Version, ProtocolVersion } from "../src/version.js";
43
import { assertEquals } from "jsr:@std/assert";
54

@@ -64,6 +63,5 @@ Deno.test("ProtocolVersion Class - Constructor", () => {
6463

6564
const protocolVersion = ProtocolVersion.fromVersion(Version.TLS12);
6665

67-
const versions = new Versions(Version.TLS13);
6866

6967

0 commit comments

Comments
 (0)