Files
ccdi/ruoyi-ui/tests/unit/preliminary-check-risk-people-binding.test.js

26 lines
905 B
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
const assert = require("assert");
const fs = require("fs");
const path = require("path");
const source = fs.readFileSync(
path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/RiskPeopleSection.vue"),
"utf8"
);
[
"sectionData.overviewList",
"normalizeOverviewRows",
"normalizeRiskPointTags",
"riskCount",
"riskPoint",
"modelCount",
"riskLevelType",
].forEach((token) => assert(source.includes(token), token));
assert(!source.includes("sectionData.topRiskList"), "不应再绑定TOP10列表");
assert(!source.includes("scope.row.riskLevelType || 'danger'"), "riskLevelType fallback");
assert(source.includes('scope.row.actionLabel || "查看详情"'), "actionLabel fallback");
assert(source.includes("return [];"), "overviewList 缺省时应回落为空数组");
assert(source.includes(".split(/[、,;]/)"), "核心异常点字符串应支持拆分为标签");