History

Suppress no-double-cast in test stubs with reason

Rhys Sullivan committed 6 months ago

Commit 48818331 parent f237cd71 file · +7 −0Browse files

Unified · Split

apps/cloud/src/auth/handlers.node.test.ts+7−0
@@ -183,6 +183,10 @@ describe("Auth callback handlers", () => { · 182 unmodified lines
183 refreshToken: "refresh_token",183 refreshToken: "refresh_token",
184 sealedSession: "sealed_session_no_org",184 sealedSession: "sealed_session_no_org",
185 } satisfies AuthenticateWithCodeResult),185 } satisfies AuthenticateWithCodeResult),
186 // The handler only reads `data[*].organizationId` and
187 // `data[*].status`, so we stub a minimal shape matching that
188 // contract instead of hand-rolling the full WorkOS SDK types.
189 // oxlint-disable-next-line executor/no-double-cast
186 listUserMemberships: (() =>190 listUserMemberships: (() =>
187 Effect.succeed({191 Effect.succeed({
188 data: [192 data: [
@@ -228,6 +232,9 @@ describe("Auth callback handlers", () => { · 39 unmodified lines
228 refreshToken: "refresh_token",232 refreshToken: "refresh_token",
229 sealedSession: "sealed_session_fallback",233 sealedSession: "sealed_session_fallback",
230 } satisfies AuthenticateWithCodeResult),234 } satisfies AuthenticateWithCodeResult),
235 // Same minimal-shape stub as above — see comment in the
236 // pending-membership test.
237 // oxlint-disable-next-line executor/no-double-cast
231 listUserMemberships: (() =>238 listUserMemberships: (() =>
232 Effect.succeed({239 Effect.succeed({
233 data: [240 data: [