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.
15 lines
758 B
JavaScript
15 lines
758 B
JavaScript
|
1 month ago
|
const assert = require("node:assert/strict");
|
||
|
|
const fs = require("node:fs");
|
||
|
|
const path = require("node:path");
|
||
|
|
|
||
|
|
const root = path.resolve(__dirname, "..");
|
||
|
|
const router = fs.readFileSync(path.join(root, "src/router/index.js"), "utf8");
|
||
|
|
const analysis = fs.readFileSync(path.join(root, "src/views/analysis-of-students/analysis.vue"), "utf8");
|
||
|
|
|
||
|
|
assert.match(router, /import\s*\{\s*createWebHashHistory,\s*createRouter\s*\}/);
|
||
|
|
assert.match(router, /history:\s*createWebHashHistory\(\)/);
|
||
|
|
assert.match(analysis, /const hasAiAssessmentScore = \(value\) => value !== null && value !== undefined && value !== ""/);
|
||
|
|
assert.match(analysis, /hasAiAssessmentScore\(task\.aiAssessmentScore\)/);
|
||
|
|
|
||
|
|
console.log("AI route refresh and score presence static checks passed");
|