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 <noreply@anthropic.com>
This commit is contained in:
@@ -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", () => {
|
||||
|
||||
Reference in New Issue
Block a user