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/product/differentiation.vue"); const templatePath = path.resolve( __dirname, "../../dianshang-houduan/src/main/resources/static/file/training-materials/product-value-positioning/12.产品价值主张画布模版.pptx" ); test("产品价值主张画布模板由后端内置 PPTX 提供下载", () => { const source = fs.readFileSync(sourcePath, "utf8"); assert.ok(fs.existsSync(templatePath), "后端应提供产品价值主张画布 PPTX 模板"); assert.match( source, /\/file\/training-materials\/product-value-positioning\/12\.产品价值主张画布模版\.pptx/ ); assert.match( source, /function downloadCanvasTemplate\(\) \{\s*downloadBuiltInFile\(VALUE_PROPOSITION_CANVAS_TEMPLATE_URL, "12\.产品价值主张画布模版\.pptx"\);\s*\}/ ); });