test(update): compare generated paths portably
这个提交包含在:
父节点
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),
|
||||
|
||||
正在加载...
在新工单中引用
屏蔽一个用户