19 lines
779 B
JavaScript
19 lines
779 B
JavaScript
|
|
const assert = require("assert");
|
||
|
|
const fs = require("fs");
|
||
|
|
const path = require("path");
|
||
|
|
|
||
|
|
const source = fs.readFileSync(
|
||
|
|
path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/SpecialCheck.vue"),
|
||
|
|
"utf8"
|
||
|
|
);
|
||
|
|
|
||
|
|
const familyIndex = source.indexOf("family-asset-liability-section");
|
||
|
|
const graphIndex = source.indexOf("graph-placeholder-card");
|
||
|
|
const extendedIndex = source.indexOf("special-check-extended-wrapper");
|
||
|
|
|
||
|
|
assert(familyIndex >= 0, "缺少家庭资产负债区块");
|
||
|
|
assert(graphIndex >= 0, "缺少图谱外链卡片");
|
||
|
|
assert(extendedIndex >= 0, "缺少拓展查询卡片容器");
|
||
|
|
assert(familyIndex < graphIndex, "家庭资产负债应位于图谱外链卡片前");
|
||
|
|
assert(graphIndex < extendedIndex, "拓展查询应位于图谱外链卡片下方");
|