// The five levels of inertia, as the screen names them (ADR 0007). import { describe, expect, it } from 'vitest'; import { en } from '../../src/lib/i18n/en'; import { es } from '../../src/lib/i18n/es'; import { fr } from '../../src/lib/i18n/fr'; import { INERTIA_LEVELS } from '../../src/lib/types'; describe('five levels of inertia', () => { it('go from 1 to 5, 3 in the middle', () => { expect(INERTIA_LEVELS).toEqual([1, 2, 3, 4, 5]); }); it('each level has its own short name, in the three languages', () => { expect(INERTIA_LEVELS.map((k) => fr[`inertia.name.${k}`])).toEqual(['très basse', 'basse', 'moyenne', 'haute', 'très haute']); expect(INERTIA_LEVELS.map((k) => en[`inertia.name.${k}`])).toEqual(['very low', 'low', 'medium', 'high', 'very high']); expect(INERTIA_LEVELS.map((k) => es[`inertia.name.${k}`])).toEqual(['muy baja', 'baja', 'media', 'alta', 'muy alta']); }); it('a change of inertia is said to be voted at the level of the article, no longer one above', () => { for (const cat of [fr, en, es]) expect(cat['inertia.change.note']).toContain('{level}'); expect(fr['inertia.change.note']).toContain("à l'inertie de l'article"); expect(fr['inertia.change.note']).not.toContain('au-dessus'); }); });