diff --git a/server/models/TeamDomain.test.ts b/server/models/TeamDomain.test.ts index ceefb38e378c..bef4cf5ad6e9 100644 --- a/server/models/TeamDomain.test.ts +++ b/server/models/TeamDomain.test.ts @@ -45,12 +45,13 @@ describe("team domain model", () => { it("should not allow creation of domains within restricted list", async () => { env.DEPLOYMENT = "hosted"; - const TeamDomain = import("./TeamDomain"); + const TeamDomain = await import("./TeamDomain"); const team = await buildTeam(); const user = await buildAdmin({ teamId: team.id }); let error; try { + // @ts-expect-error TeamDomain type await TeamDomain.create({ teamId: team.id, name: "gmail.com", @@ -64,12 +65,13 @@ describe("team domain model", () => { it("should ignore casing and spaces when creating domains", async () => { env.DEPLOYMENT = "hosted"; - const TeamDomain = import("./TeamDomain"); + const TeamDomain = await import("./TeamDomain"); const team = await buildTeam(); const user = await buildAdmin({ teamId: team.id }); let error; try { + // @ts-expect-error TeamDomain type await TeamDomain.create({ teamId: team.id, name: " GMail.com ",