const assert = require("node:assert/strict"); const fs = require("node:fs"); const path = require("node:path"); const root = path.resolve(__dirname, ".."); const page = fs.readFileSync(path.join(root, "src", "views", "teacherEnd", "score", "index.vue"), "utf8"); const api = fs.readFileSync(path.join(root, "src", "api", "teacher.js"), "utf8"); assert.match(page, /label="教师评分"/); assert.match(page, /v-model="row\.teacherScoreDraft"/); assert.match(page, /:precision="0"/); assert.match(page, /saveTaskTeacherScore\(row\)/); assert.match(page, /教师评分必须为0至100之间的整数/); assert.match(page, /taskDetailPagination/); assert.match(page, /taskDetailTotal/); assert.match(page, /@pagination="getClassScoreDetail"/); assert.match(page, /refreshScoreDetail/); assert.match(api, /export function saveTaskTeacherScore/); assert.match(api, /url: "\/api\/weight\/saveTaskTeacherScore"/); console.log("teacher task score detail static checks passed");