From ce5a27d014ded72ea5289c8d3f211b459d22df75 Mon Sep 17 00:00:00 2001 From: igm Date: Mon, 12 Jan 2026 17:34:25 +0800 Subject: [PATCH] Remove redundant null/undefined tests from createDb TypeScript already enforces the string type at compile time, so runtime tests for invalid type inputs are unnecessary. Co-Authored-By: Claude Opus 4.5 --- packages/db/src/client.test.ts | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/packages/db/src/client.test.ts b/packages/db/src/client.test.ts index 0acc798..d1c221e 100644 --- a/packages/db/src/client.test.ts +++ b/packages/db/src/client.test.ts @@ -19,19 +19,6 @@ describe("createDb", () => { "Database connection string is required", ); }); - - test("throws error for null-ish connection string", () => { - // biome-ignore lint/suspicious/noExplicitAny: testing edge case with invalid input - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument - expect(() => createDb(null as any)).toThrow( - "Database connection string is required", - ); - // biome-ignore lint/suspicious/noExplicitAny: testing edge case with invalid input - // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-argument - expect(() => createDb(undefined as any)).toThrow( - "Database connection string is required", - ); - }); }); describeE2E("[e2e] createDb with real database", () => {