26 lines
843 B
JavaScript
26 lines
843 B
JavaScript
const assert = require("assert");
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const componentPath = path.resolve(
|
|
__dirname,
|
|
"../../src/views/ccdiProject/components/detail/FamilyAssetLiabilityDetail.vue"
|
|
);
|
|
const source = fs.readFileSync(componentPath, "utf8");
|
|
|
|
[
|
|
"formatDetailDateTime(value)",
|
|
'return parseTime(value, hasTime ? "{y}-{m}-{d} {h}:{i}:{s}" : "{y}-{m}-{d}") || "-";',
|
|
"{{ formatDetailDateTime(scope.row.valuationDate) }}",
|
|
"{{ formatDetailDateTime(scope.row.queryDate) }}",
|
|
].forEach((token) => {
|
|
assert(source.includes(token), `专项核查详情日期展示缺少关键实现: ${token}`);
|
|
});
|
|
|
|
assert(
|
|
source.includes("const hasTime = !formatted.endsWith(\" 00:00:00\");"),
|
|
"专项核查详情应隐藏无意义的零点时间"
|
|
);
|
|
|
|
console.log("special-check-detail-date-display test passed");
|