feat: remove Learning module

This commit is contained in:
inman
2026-09-04 12:01:42 +08:00
parent bdc290c2cf
commit bd0873f348
39 changed files with 104 additions and 2278 deletions

View File

@@ -0,0 +1,33 @@
import { describe, expect, it } from 'vitest';
import {
DEFAULT_MODULE_ACCESS,
MODULE_ACCESS_KEYS,
normalizeModuleAccess,
} from '../../shared/module-access';
describe('module access projection', () => {
it('contains only the three supported product modules', () => {
expect(MODULE_ACCESS_KEYS).toEqual(['programming', 'design', 'robot']);
expect(DEFAULT_MODULE_ACCESS).toEqual({
programming: true,
design: true,
robot: true,
});
});
it('drops the retired Learning key from legacy or upstream policy data', () => {
const access = normalizeModuleAccess({
programming: false,
design: true,
learning: false,
robot: false,
});
expect(access).toEqual({
programming: false,
design: true,
robot: false,
});
expect(access).not.toHaveProperty('learning');
});
});