import { expect, test } from 'bun:test'; import { seatCols, seatsPerRow } from './seat-rows'; test('seatCols keeps one row when it fits and balances rows when it wraps', () => { expect(seatCols(0, 8)).toBe(1); expect(seatCols(3, 8)).toBe(3); expect(seatCols(8, 8)).toBe(8); expect(seatCols(9, 8)).toBe(5); expect(seatCols(9, 5)).toBe(5); expect(seatCols(6, 5)).toBe(3); expect(seatCols(7, 5)).toBe(4); }); test('seatsPerRow counts whole seats including gaps', () => { expect(seatsPerRow(1000, 118, 8)).toBe(8); expect(seatsPerRow(999, 118, 8)).toBe(7); expect(seatsPerRow(652, 118, 8)).toBe(5); expect(seatsPerRow(50, 118, 8)).toBe(1); });