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,