import test from 'node:test'; import assert from 'node:assert/strict'; import { REQUIREMENT_TABLE_BADGE_CLASS, getRequirementTableTextClass, } from './requirement-table-layout'; test('keeps requirement table badges on one line', () => { assert.match(REQUIREMENT_TABLE_BADGE_CLASS, /\bwhitespace-nowrap\b/); assert.match(REQUIREMENT_TABLE_BADGE_CLASS, /\bshrink-0\b/); }); test('clips long requirement source project type and creator cells', () => { for (const column of ['source', 'project', 'type', 'creator'] as const) { const className = getRequirementTableTextClass(column); assert.match(className, /\btruncate\b/); assert.match(className, /\bblock\b/); assert.match(className, /\bmax-w-\[/); } });