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

Function deleteDomain

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

Source from the content-addressed store, hash-verified

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

Callers 1

handlers.test.tsFile · 0.85

Calls 3

orgAppFunction · 0.85
workosForCallerFunction · 0.85
pushMethod · 0.80

Tested by

no test coverage detected