test: guard LDAP user lookup

This commit is contained in:
ajnart committed 2026-07-30 00:50:02 +02:00
1 parent 9963ba0274
commit cd6c83a7b0
1 file changed
+4 -1
+4 -1
View File
@@ -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,