新增项目列表重新分析前端接口
This commit is contained in:
23
ruoyi-ui/tests/unit/project-list-reanalyze-api.test.js
Normal file
23
ruoyi-ui/tests/unit/project-list-reanalyze-api.test.js
Normal file
@@ -0,0 +1,23 @@
|
||||
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");
|
||||
Reference in New Issue
Block a user