35 lines
905 B
JavaScript
35 lines
905 B
JavaScript
const assert = require("assert");
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const pagePath = path.resolve(
|
|
__dirname,
|
|
"../../src/views/ccdiStaffRecruitment/index.vue"
|
|
);
|
|
const apiPath = path.resolve(
|
|
__dirname,
|
|
"../../src/api/ccdiStaffRecruitment.js"
|
|
);
|
|
|
|
const pageSource = fs.readFileSync(pagePath, "utf8");
|
|
const apiSource = fs.readFileSync(apiPath, "utf8");
|
|
const source = `${pageSource}\n${apiSource}`;
|
|
|
|
[
|
|
"handleImport()",
|
|
'"/ccdi/staffRecruitment/importData"',
|
|
"招聘信息管理导入模板"
|
|
].forEach((token) => {
|
|
assert(source.includes(token), `招聘导入入口缺少统一双Sheet能力: ${token}`);
|
|
});
|
|
|
|
[
|
|
"handleWorkImport",
|
|
"importWorkData",
|
|
"workImportTemplate"
|
|
].forEach((token) => {
|
|
assert(!source.includes(token), `招聘页不应继续保留独立工作经历导入: ${token}`);
|
|
});
|
|
|
|
console.log("staff-recruitment-import-toolbar test passed");
|