MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / deleteDomain

Function deleteDomain

apps/cloud/src/org/handlers.test.ts:273–290  ·  view source on GitHub ↗
(role: "admin" | "member")

Source from the content-addressed store, hash-verified

271});
272
273const deleteDomain = async (role: "admin" | "member") => {
274 const deleted: string[] = [];
275 const app = orgApp(role, workosForCaller(deleted));
276 apps.push(app);
277 const response = await app.handler(
278 new Request(`https://executor.test/org/domains/${DOMAIN}`, {
279 method: "DELETE",
280 headers: {
281 cookie: `wos-session=sealed; ${await verifiedSettingsCookie(CALLER)}`,
282 [ORG_SELECTOR_HEADER]: ORG,
283 },
284 }),
285 // beta.59: the handler type expects a context argument; this layer stack
286 // needs none at runtime — pass undefined like the api.request-scope tests.
287 undefined as never,
288 );
289 return { status: response.status, deleted };
290};
291
292describe("Org domain handlers over HTTP: the admin gate is the authorized role", () => {
293 it("lets a mirrored admin delete a domain", async () => {

Callers 1

handlers.test.tsFile · 0.85

Calls 4

verifiedSettingsCookieFunction · 0.90
orgAppFunction · 0.85
workosForCallerFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected