You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.2 KiB
JavaScript
31 lines
1.2 KiB
JavaScript
|
1 month ago
|
const assert = require("node:assert/strict");
|
||
|
|
const fs = require("node:fs");
|
||
|
|
const path = require("node:path");
|
||
|
|
|
||
|
|
const page = fs.readFileSync(
|
||
|
|
path.resolve(__dirname, "../src/views/product/requirements-doc.vue"),
|
||
|
|
"utf8"
|
||
|
|
);
|
||
|
|
|
||
|
|
assert.match(page, /const PRD_DETAIL_MODULES = \[/);
|
||
|
|
assert.match(page, /项目背景与痛点/);
|
||
|
|
assert.match(page, /用户需求与场景/);
|
||
|
|
assert.match(page, /核心功能需求/);
|
||
|
|
assert.match(page, /非功能需求/);
|
||
|
|
assert.match(page, /硬件规格与设计需求/);
|
||
|
|
assert.match(page, /测试需求/);
|
||
|
|
assert.match(page, /项目规划/);
|
||
|
|
assert.match(page, /step2Answer: JSON\.stringify\(buildStepTwoAnswer\(\)\)/);
|
||
|
|
assert.match(page, /saveAction: "SAVE"/);
|
||
|
|
assert.match(page, /示例参考:/);
|
||
|
|
assert.match(page, /学生填写:/);
|
||
|
|
assert.match(page, /XLSX\.writeFile\(workbook, "PRD详细信息表\.xlsx"\)/);
|
||
|
|
|
||
|
|
assert.match(page, /previewRequirementsDocumentFile/);
|
||
|
|
assert.match(page, /step3Answer: JSON\.stringify\(buildStepThreeAnswer\(\)\)/);
|
||
|
|
assert.match(page, /accept="\.docx,\.pdf/);
|
||
|
|
assert.match(page, /handleDocumentUpload/);
|
||
|
|
assert.match(page, /在线预览/);
|
||
|
|
|
||
|
|
console.log("requirements-document step two and three static checks passed");
|