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-training-navigation...

27 lines
796 B
JavaScript

import assert from "node:assert/strict";
import { buildStudentTaskSections, getComprehensiveTopTask } from "../src/utils/studentTrainingNavigation.js";
const sections = buildStudentTaskSections([
{
taskKey: "teacher-added-task",
taskName: "教师新增任务",
projectName: "市场洞察与需求分析",
sort: 1,
},
]);
assert.deepEqual(sections, [
{
title: "市场洞察与需求分析",
children: [{ title: "教师新增任务", path: "/training/task/teacher-added-task" }],
},
]);
assert.deepEqual(getComprehensiveTopTask([{ taskKey: "comprehensive-case-training", taskName: "综合实训" }]), {
title: "综合实训",
path: "/comprehensive/index",
activePrefix: "/comprehensive",
});
console.log("student training navigation ESM contract passed");