Skip to content

Commit 72014ce

Browse files
committed
chore: lint
1 parent 78d1056 commit 72014ce

File tree

2 files changed

+3
-43
lines changed

2 files changed

+3
-43
lines changed

tests/config.test.ts

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,7 @@ describe("default configuration management", () => {
142142

143143
const config2 = configure({
144144
apiKey: "api-key-2",
145-
nodes: [
146-
// @ts-expect-error - this host is invalid
147-
{ host: "different-host", port: 8109, protocol: "https" },
148-
],
145+
nodes: [{ host: "different-host", port: 8109, protocol: "https" }],
149146
});
150147

151148
setDefaultConfiguration(config1);
@@ -201,16 +198,12 @@ describe("default configuration management", () => {
201198
it("should return provided config when given", () => {
202199
const defaultConfig = configure({
203200
apiKey: "default-key",
204-
// @ts-expect-error - this host is invalid
205201
nodes: [{ host: "default-host", port: 8108, protocol: "http" }],
206202
});
207203

208204
const providedConfig = configure({
209205
apiKey: "provided-key",
210-
nodes: [
211-
// @ts-expect-error - this host is invalid
212-
{ host: "provided-host", port: 8109, protocol: "https" },
213-
],
206+
nodes: [{ host: "provided-host", port: 8109, protocol: "https" }],
214207
});
215208

216209
setDefaultConfiguration(defaultConfig);
@@ -222,7 +215,6 @@ describe("default configuration management", () => {
222215
it("should return default config when no config is provided", () => {
223216
const defaultConfig = configure({
224217
apiKey: "default-key",
225-
// @ts-expect-error - this host is invalid
226218
nodes: [{ host: "default-host", port: 8108, protocol: "http" }],
227219
});
228220

@@ -235,10 +227,7 @@ describe("default configuration management", () => {
235227
it("should return default config when undefined is explicitly passed", () => {
236228
const defaultConfig = configure({
237229
apiKey: "default-key",
238-
nodes: [
239-
// @ts-expect-error - this host is invalid
240-
{ host: "default-host", port: 8108, protocol: "http" },
241-
],
230+
nodes: [{ host: "default-host", port: 8108, protocol: "http" }],
242231
});
243232

244233
setDefaultConfiguration(defaultConfig);
@@ -283,13 +272,11 @@ describe("default configuration management", () => {
283272
it("should handle multiple configurations in sequence", () => {
284273
const config1 = configure({
285274
apiKey: "key-1",
286-
// @ts-expect-error - invalid host
287275
nodes: [{ host: "host-1", port: 8108, protocol: "http" }],
288276
});
289277

290278
const config2 = configure({
291279
apiKey: "key-2",
292-
// @ts-expect-error - invalid host
293280
nodes: [{ host: "host-2", port: 8109, protocol: "https" }],
294281
});
295282

@@ -310,12 +297,9 @@ describe("default configuration management", () => {
310297
const config = configure({
311298
apiKey: "complex-key",
312299
nodes: [
313-
// @ts-expect-error - invalid host
314300
{ host: "node1", port: 8108, protocol: "http" },
315-
// @ts-expect-error - invalid host
316301
{ host: "node2", port: 8109, protocol: "https" },
317302
],
318-
// @ts-expect-error - invalid host
319303
nearestNode: { url: "http://nearest-node" },
320304
randomizeNodes: true,
321305
connectionTimeoutSeconds: 10,

tests/node.test.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -79,30 +79,6 @@ describe("type tests", () => {
7979
// @ts-expect-error This is erroring as expected
8080
const _error: UrlString = "ftp://localhost:3000";
8181
});
82-
it("should only let a path be prefixed with a slash", () => {
83-
const _config: UrlString = "http://localhost:3000/a";
84-
// @ts-expect-error This is erroring as expected
85-
const _error: UrlString = "http://localhost:3000api";
86-
});
87-
it("should only let ports be numbers", () => {
88-
const _config: UrlString = "http://localhost:3000";
89-
// @ts-expect-error This is erroring as expected
90-
const _error: UrlString = "http://localhost:port";
91-
});
92-
it("should only let domains be strings", () => {
93-
const _config: UrlString = "http://localhost";
94-
// @ts-expect-error This is erroring as expected
95-
const _error: UrlString = "http://23:3000";
96-
});
97-
it("should not end on an empty path", () => {
98-
const _config: UrlString = "http://localhost:3000";
99-
// @ts-expect-error This is erroring as expected
100-
const _error: UrlString = "http://localhost:3000/";
101-
});
102-
it("should let an empty path", () => {
103-
const _port: UrlString = "http://localhost:3000";
104-
const _empty: UrlString = "http://localhost";
105-
});
10682
});
10783
});
10884
describe("function tests", () => {

0 commit comments

Comments
 (0)