fix(test): 修正大厅价格路由测试的 Windows 路径分隔符断言

This commit is contained in:
2026-11-15 16:58:49 +08:00
parent e2c27bc7a9
commit d7606060a4
@@ -47,12 +47,13 @@ test('所有直接写 open 的接单仓库调用都必须先物化大厅价格',
source.lastIndexOf('\nfunction ', matchIndex),
)
const before = source.slice(functionStart, matchIndex)
const relativePath = path.relative(BACKEND_SRC, file).split(path.sep).join('/')
assert.match(
before,
/assertWorkOrderHallPriceReadyWithClient\s*\(/,
`${path.relative(BACKEND_SRC, file)} 存在未经大厅价格物化直接写 open 的路径`,
`${relativePath} 存在未经大厅价格物化直接写 open 的路径`,
)
directWrites.push(path.relative(BACKEND_SRC, file))
directWrites.push(relativePath)
}
}