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"
);

[
  "handleRiskPeopleExport",
  "this.download(",
  "ccdi/project/overview/risk-people/export",
  "projectId: this.projectId",
  "风险人员总览_",
].forEach((token) => assert(source.includes(token), token));

assert(source.includes('@click="handleRiskPeopleExport"'), "导出按钮必须绑定导出事件");
