feat: remove Learning module
This commit is contained in:
33
tests/unit/module-access.test.ts
Normal file
33
tests/unit/module-access.test.ts
Normal 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');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user