chore: establish learning module baseline
This commit is contained in:
commit
2d04197f3f
2409 files changed
+533050
No files matched your search
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { courseModuleCoursewareId } from '@/lib/course-framework/publish-identity';
|
||||
|
||||
describe('large-course public module identity', () => {
|
||||
it('is stable and does not contain the mutable classroom id', () => {
|
||||
expect(courseModuleCoursewareId('course-123', 2)).toBe('course_course-123_module_2');
|
||||
expect(courseModuleCoursewareId('course-123', 2)).not.toContain('classroom-private-source');
|
||||
});
|
||||
|
||||
it('rejects invalid course and module identities', () => {
|
||||
expect(() => courseModuleCoursewareId('../course', 1)).toThrow('Invalid course id');
|
||||
expect(() => courseModuleCoursewareId('course-123', 0)).toThrow('Invalid module index');
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user