refactor: simplify Phase 1 infrastructure code
- cache-invalidation: extract isExpectedRevalidateError helper - integration-data-cache: flatten early-return chain, extract eviction - redis-handler: extract StoredEntry type, readStreamBody, ensureConnected - svg-purify: single getOwnPropertyDescriptor lookup per prop - session-scoped-providers: simplify auth flow - retryable-loader: use function declarations - translation/request: replace spread-in-reduce with for loop
This commit is contained in:
8 files changed
+148
-134
No files matched your search
@@ -68,7 +68,8 @@ describe("SVG sanitization", () => {
|
||||
});
|
||||
|
||||
it("preserves well-formed SVG with self-closing children", () => {
|
||||
const icon = '<svg viewBox="0 0 24 24"><path d="M12 2L2 22h20Z" fill="currentColor"/><circle cx="12" cy="8" r="2"/></svg>';
|
||||
const icon =
|
||||
'<svg viewBox="0 0 24 24"><path d="M12 2L2 22h20Z" fill="currentColor"/><circle cx="12" cy="8" r="2"/></svg>';
|
||||
const clean = sanitizeSvg(icon);
|
||||
expect(clean).toContain("<path");
|
||||
expect(clean).toContain("<circle");
|
||||
|
||||
Reference in new issue
Block a user