From cd6c83a7b0b702987cdd4a6f24c12b6a7892e8cb Mon Sep 17 00:00:00 2001 From: ajnart Date: Thu, 30 Jul 2026 00:50:02 +0200 Subject: [PATCH] test: guard LDAP user lookup --- e2e/lldap.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/e2e/lldap.spec.ts b/e2e/lldap.spec.ts index f1e6aabbc..19ff9905c 100644 --- a/e2e/lldap.spec.ts +++ b/e2e/lldap.spec.ts @@ -62,7 +62,10 @@ describe("LLDAP authorization", () => { }, }); expect(users).toHaveLength(1); - const user = users[0]!; + const user = users[0]; + if (!user) { + throw new Error("Expected LDAP login to create one user"); + } expect(user).toEqual( expect.objectContaining({ name: defaultCredentials.username,