Skip to content

Turn any idea, plan, or codebase into a beautiful interactive diagram. An agent skill for Claude Code, Codex, and more.

test(website): decode font staging repository file URLs (#775)

tt-a1i6617cbacf420
diff --git a/website/test/local-fonts.test.mjs b/website/test/local-fonts.test.mjs
index 98846981..4f58276c 100644
--- a/website/test/local-fonts.test.mjs
+++ b/website/test/local-fonts.test.mjs
@@ -3,6 +3,7 @@ import assert from 'node:assert/strict';
import fs from 'node:fs';
import os from 'node:os';
import path from 'node:path';
+import { fileURLToPath } from 'node:url';
import { createHash } from 'node:crypto';
import { parse } from 'parse5';
import { stagePublic } from '../scripts/stage-public.mjs';
@@ -47,7 +48,7 @@ test('local font declarations preserve the original families, weights and swap b
test('tracked public staging ships authentic WOFF2 bytes, licenses and the CSS references', () => {
const output = fs.mkdtempSync(path.join(os.tmpdir(), 'archify-local-fonts-'));
try {
- stagePublic(path.resolve(repo.pathname), output);
+ stagePublic(fileURLToPath(repo), output);
assert.equal(manifest.fonts.length, 5);
assert.equal(manifest.licenses.length, 4);
assert.deepEqual(fs.readFileSync(path.join(output, 'fonts/fonts.css')), fs.readFileSync(new URL('fonts.css', fonts)));