test: type the empty sign-in forms

This commit is contained in:
Aarnav Tale
2026-10-17 17:46:10 -07:00
parent 89b2cefef0
commit 57c3354d68
+7 -4
View File
@@ -34,11 +34,14 @@ describe.for(HEADSCALE_VERSIONS)("API key sign-in on Headscale %s", (version) =>
});
describe("API key sign-in", () => {
test.for([{}, { api_key: "" }])("asks for a key when none is given (%o)", async (form) => {
await using app = await createTestApp();
test.for<Record<string, string>>([{}, { api_key: "" }])(
"asks for a key when none is given (%o)",
async (form) => {
await using app = await createTestApp();
expect(await signIn(app, form)).toEqual({ success: false, message: "Enter an API key." });
});
expect(await signIn(app, form)).toEqual({ success: false, message: "Enter an API key." });
},
);
test("explains when Headscale can't be reached", async () => {
await using app = await createTestApp();