From a0810bd523076bca7fae3d944b56e6b3e2496d11 Mon Sep 17 00:00:00 2001 From: Cl Date: Tue, 8 Sep 2026 20:48:11 +0800 Subject: [PATCH] test: canonicalize Windows artifact fixture roots --- scripts/audit-release-artifacts.test.mjs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/scripts/audit-release-artifacts.test.mjs b/scripts/audit-release-artifacts.test.mjs index e010422..8fb927e 100644 --- a/scripts/audit-release-artifacts.test.mjs +++ b/scripts/audit-release-artifacts.test.mjs @@ -1,5 +1,13 @@ import { Buffer } from 'node:buffer'; -import { link, mkdtemp, mkdir, rm, symlink, writeFile } from 'node:fs/promises'; +import { + link, + mkdtemp, + mkdir, + realpath, + rm, + symlink, + writeFile, +} from 'node:fs/promises'; import { tmpdir } from 'node:os'; import path from 'node:path'; @@ -24,8 +32,10 @@ afterEach(async () => { }); async function temporaryRoot() { + // Windows TEMP may use an 8.3 alias. Normal fixtures need canonical paths; + // the tests below still pass their deliberately created aliases unchanged. const root = await mkdtemp( - path.join(tmpdir(), 'textbooklens-artifact-test-'), + path.join(await realpath(tmpdir()), 'textbooklens-artifact-test-'), ); temporaryRoots.push(root); return root;