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

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

[
  'return "全部模型"',
  "this.selectedModelCodes = [...this.selectedModelCodes, modelCode]",
  "this.selectedModelCodes = this.selectedModelCodes.filter((item) => item !== modelCode)",
  "buildPeopleParams()",
  "modelCodes: this.selectedModelCodes",
  "matchMode: this.matchMode",
  'this.matchMode = "ANY"',
  'this.selectedModelCodes = []',
  'this.keyword = ""',
  "this.deptId = undefined",
  "this.pageNum = 1",
  "this.fetchPeopleList({ syncCardLoading: true })",
  "keyword: this.keyword",
  "deptId: this.deptId",
].forEach((token) => assert(source.includes(token), token));
