26 lines
714 B
JavaScript
26 lines
714 B
JavaScript
const assert = require("assert");
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
|
|
const componentPath = path.resolve(
|
|
__dirname,
|
|
"../../src/views/ccdiProject/components/detail/UploadData.vue"
|
|
);
|
|
const source = fs.readFileSync(componentPath, "utf8");
|
|
|
|
const tableBlockMatch = source.match(
|
|
/<el-table[\s\S]*?:data="fileUploadList"[\s\S]*?>/m
|
|
);
|
|
|
|
assert(tableBlockMatch, "未找到上传数据文件列表表格");
|
|
assert(
|
|
!/\sborder(\s|>)/.test(tableBlockMatch[0]),
|
|
"上传数据文件列表表格不应再启用边框"
|
|
);
|
|
assert(
|
|
!/\sstripe(\s|>)/.test(tableBlockMatch[0]),
|
|
"上传数据文件列表表格不应再启用斑马纹"
|
|
);
|
|
|
|
console.log("upload-data-file-list-table test passed");
|