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/student-contact-fields.stat...

17 lines
677 B
JavaScript

const assert = require("assert");
const fs = require("fs");
const path = require("path");
const readView = (...parts) => fs.readFileSync(path.join(__dirname, "..", "src", "views", ...parts), "utf8");
const teacherStudentView = readView("teacherEnd", "student", "index.vue");
const schoolAdminStudentView = readView("schoolAdmin", "student", "index.vue");
for (const [name, source] of [
["教师端学生管理", teacherStudentView],
["学校管理员端学生管理", schoolAdminStudentView],
]) {
assert(!/\b(phone|email)\b/.test(source), `${name}不应再展示、录入或导出电话和邮箱字段`);
}
console.log("student contact fields static checks passed");