Export KetoError from the plugin barrel, and delete a group's grants and parent memberships when its last member leaves
CI / full-gate (push) Failing after 54s

This commit is contained in:
2026-11-17 01:04:16 +01:00
parent 852137982d
commit 37e7227dea
6 changed files with 129 additions and 18 deletions
+10
View File
@@ -22,3 +22,13 @@ test("plugin-api re-exports the stable author value surface", () => {
assert.equal(api.safeUrl("javascript:alert(1)"), "#"); // the URL sanitiser for rendering untrusted hrefs
assert.equal(api.definePlugin({ apiVersion: "1.0.0" }).apiVersion, "1.0.0"); // identity helper works through the barrel
});
// A system plugin tells an Ory failure apart by `instanceof`; each client's error class must be the barrel's.
test("plugin-api re-exports the Ory error classes a ctx.system client throws", async () => {
const { KetoError } = await import("../auth/keto-client.ts");
assert.equal(api.KetoError, KetoError);
for (const name of ["KratosError", "HydraError", "KetoError"] as const) {
assert.equal(typeof api[name], "function", `missing export: ${name}`);
}
});