From 1e130deaa1c1c9731d13ea6514f5fdd6bffa2b3e Mon Sep 17 00:00:00 2001 From: XuqmGroup Date: Mon, 27 Jul 2026 10:24:12 +0800 Subject: [PATCH] test(update): compare generated paths portably --- packages/update/scripts/xuqm-rn.test.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/update/scripts/xuqm-rn.test.mjs b/packages/update/scripts/xuqm-rn.test.mjs index 6cebef3..20533e2 100644 --- a/packages/update/scripts/xuqm-rn.test.mjs +++ b/packages/update/scripts/xuqm-rn.test.mjs @@ -8,6 +8,7 @@ import { mkdirSync, mkdtempSync, readFileSync, + realpathSync, rmSync, writeFileSync, } from 'node:fs' @@ -468,7 +469,10 @@ test('building one buz first rebuilds startup and common module maps', () => { const calls = JSON.parse(readFileSync(path.join(root, 'module-calls.json'), 'utf8')) assert.equal(calls[0].entry, './startup.ts') - assert.match(calls[1].entry, /\.xuqm-cache\/ownership\/common\.android\.js$/) + assert.equal( + path.relative(realpathSync(root), realpathSync(calls[1].entry)), + path.join('.xuqm-cache', 'ownership', 'common.android.js'), + ) assert.equal(calls[2].entry, './orders.ts') assert.deepEqual( calls.map(({ entry: _entry, ...call }) => call),