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.
dianshang-qianduan/tests/target-user-profile-materia...

20 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 source = fs.readFileSync(path.resolve(__dirname, "../src/views/demand/people.vue"), "utf8");
const materialDir = path.resolve(
__dirname,
"../../dianshang-houduan/src/main/resources/static/file/training-materials/target-user-profile"
);
test("目标用户画像第一步从后端下载操作说明与 Excel 模板", () => {
assert.ok(fs.existsSync(path.join(materialDir, "8.实训操作说明.docx")), "操作说明应随后端资源发布");
assert.ok(fs.existsSync(path.join(materialDir, "8.Excel计算与可视化模版.xlsx")), "Excel 模板应随后端资源发布");
assert.match(source, /\/file\/training-materials\/target-user-profile\/8\.实训操作说明\.docx/);
assert.match(source, /\/file\/training-materials\/target-user-profile\/8\.Excel计算与可视化模版\.xlsx/);
assert.match(source, /下载实训操作说明/);
assert.match(source, /下载 Excel 模板/);
});