const assert = require("assert");
const fs = require("fs");
const path = require("path");

const source = fs.readFileSync(
  path.resolve(
    __dirname,
    "../../src/views/ccdiProject/components/detail/RiskDetailSection.vue"
  ),
  "utf8"
);

[
  "涉疑交易明细",
  "全部可疑人员类型",
  "名单库命中",
  "模型规则命中",
  "本方账户",
  "对方账户",
  "关联员工",
  "摘要 / 交易类型",
  "异常标签",
  "<pagination",
  "pageSize: 5",
  ":page-sizes=\"[5]\"",
  "layout=\"total, prev, pager, next, jumper\"",
].forEach((token) => assert(source.includes(token), token));

[
  "label=\"可疑人员\"",
  "prop=\"suspiciousPersonName\"",
  "label=\"关联人\"",
  "prop=\"relatedPersonName\"",
  "label=\"关系\"",
  "prop=\"relationType\"",
].forEach((token) => assert(!source.includes(token), token));
