24 lines
608 B
JavaScript
24 lines
608 B
JavaScript
const assert = require("assert");
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const apiPath = path.resolve(__dirname, "../../src/api/ccdiProject.js");
|
|
const source = fs.readFileSync(apiPath, "utf8");
|
|
|
|
assert(
|
|
source.includes("export function rebuildProjectTags(data)"),
|
|
"应新增项目重新分析接口封装"
|
|
);
|
|
|
|
assert(
|
|
source.includes("url: '/ccdi/project/tags/rebuild'"),
|
|
"重新分析接口应指向项目标签重打标地址"
|
|
);
|
|
|
|
assert(
|
|
source.includes("method: 'post'"),
|
|
"重新分析接口应使用 POST 请求"
|
|
);
|
|
|
|
console.log("project-list-reanalyze-api test passed");
|