feat: wayfinding system across chapters, HUD and project plates; cut boot log, headlight and ops strip
This commit is contained in:
14
tests/unit/route-plate.test.ts
Normal file
14
tests/unit/route-plate.test.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { describe, expect, it } from 'vitest';
|
||||
import { routePlate } from '@/lib/route-plate';
|
||||
|
||||
describe('routePlate', () => {
|
||||
it('combines the chapter exit, position and real project fields', () => {
|
||||
expect(routePlate('05', 0, { visibility: 'private', maturity: 'active' })).toBe('05.1 / PRIVATE / ACTIVE');
|
||||
});
|
||||
it('spells multi-word maturity values without hyphens', () => {
|
||||
expect(routePlate('06', 2, { visibility: 'public', maturity: 'work-in-progress' })).toBe('06.3 / PUBLIC / WORK IN PROGRESS');
|
||||
});
|
||||
it('falls back to the position when no exit is known', () => {
|
||||
expect(routePlate(undefined, 1, { visibility: 'public', maturity: 'learning' })).toBe('2 / PUBLIC / LEARNING');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user