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

const source = fs.readFileSync(
  path.resolve(__dirname, "../../src/api/ccdi/projectSpecialCheck.js"),
  "utf8"
);

[
  "getFamilyAssetLiabilityList",
  "getFamilyAssetLiabilityDetail",
  "/ccdi/project/special-check/family-asset-liability/list",
  "/ccdi/project/special-check/family-asset-liability/detail",
].forEach((token) => assert(source.includes(token), token));

const detailStart = source.indexOf("export function getFamilyAssetLiabilityDetail(projectId, staffIdCard)");
assert(detailStart >= 0, "缺少详情接口函数定义");

const detailBlock = source.slice(detailStart, detailStart + 260);
assert(detailBlock.includes("projectId"), "详情接口缺少 projectId");
assert(detailBlock.includes("staffIdCard"), "详情接口缺少 staffIdCard");
