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.
21 lines
1.0 KiB
JavaScript
21 lines
1.0 KiB
JavaScript
const assert = require("node:assert/strict");
|
|
const fs = require("node:fs");
|
|
const path = require("node:path");
|
|
const test = require("node:test");
|
|
|
|
const sourcePath = path.resolve(__dirname, "../src/views/test/index.vue");
|
|
const guidePath = path.resolve(
|
|
__dirname,
|
|
"../../dianshang-houduan/src/main/resources/static/file/training-materials/release-channel-evaluation/21.实训操作说明.docx"
|
|
);
|
|
|
|
test("产品发布渠道评估第 3 步提供操作说明并展示加权得分校验规则", () => {
|
|
const source = fs.readFileSync(sourcePath, "utf8");
|
|
|
|
assert.ok(fs.existsSync(guidePath), "后端应提供产品发布渠道评估操作说明 Word 文件");
|
|
assert.match(source, /下载实训操作说明/);
|
|
assert.match(source, /step-three-notice/);
|
|
assert.match(source, /\/file\/training-materials\/release-channel-evaluation\/21\.实训操作说明\.docx/);
|
|
assert.match(source, /function downloadPracticeGuide\(\) \{\s*downloadBuiltInFile\(RELEASE_CHANNEL_GUIDE_URL, "21\.实训操作说明\.docx"\);\s*\}/);
|
|
});
|