// Row 254 (#1759): the library.sync refusal codes map to their HTTP status, not the 502 default. import test from 'node:test'; import assert from 'node:assert/strict'; import { busStatus } from '../src/bus.mjs'; test('row 254: each library sync code maps to its status', () => { const expected = { 'library-sync-busy': 409, 'library-diverged': 409, 'library-accept-stale': 409, 'library-accept-invalid': 400, 'library-credential-missing': 503, 'library-fetch-failed': 503, }; for (const [code, status] of Object.entries(expected)) assert.equal(busStatus(code), status, code); assert.equal(busStatus('library-not-a-code'), 502, 'an unknown code keeps the default'); });