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

const source = fs.readFileSync(
  path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/PreliminaryCheck.vue"),
  "utf8"
);
const mockSource = fs.readFileSync(
  path.resolve(__dirname, "../../src/views/ccdiProject/components/detail/preliminaryCheck.mock.js"),
  "utf8"
);

[
  "getOverviewEmployeeCreditNegative",
  "creditNegativeRes",
  "creditNegativeData",
].forEach((token) => assert(source.includes(token), token));

[
  "normalizeEmployeeCreditNegativeRows",
  "employeeCreditNegativeList",
  "employeeCreditNegativeTotal",
].forEach((token) => assert(mockSource.includes(token), token));
