test: harden package boundaries and audit budgets
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@wrnexus/dev-toolbar",
|
||||
"version": "0.8.15",
|
||||
"version": "0.8.16",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"sideEffects": false,
|
||||
|
||||
@@ -23,3 +23,19 @@ test("server issues have stable fingerprints and retain actionable error context
|
||||
expect(error.metadata?.stack).toContain("database offline");
|
||||
expect(error.recommendation).toContain("stack trace");
|
||||
});
|
||||
|
||||
test("non-Error throws are normalized without losing caller context", () => {
|
||||
const issue = issueFromError(
|
||||
{ reason: "offline" },
|
||||
{
|
||||
ruleId: "server/dependency",
|
||||
title: "Dependency failed",
|
||||
pathname: "/health",
|
||||
source: { file: "app/api/health.ts", line: 4 },
|
||||
},
|
||||
);
|
||||
expect(issue.ruleId).toBe("server/dependency");
|
||||
expect(issue.title).toBe("Dependency failed");
|
||||
expect(issue.message).toBe("[object Object]");
|
||||
expect(issue.fingerprint).toContain("app/api/health.ts:4:0");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user