test(update): compare generated paths portably

这个提交包含在:
XuqmGroup 2026-07-27 10:24:12 +08:00
父节点 56fb6efccc
当前提交 1e130deaa1

查看文件

@ -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),