Files
gods-eye-view/src/layers/shipwrecks/eras.test.mjs
T
Itallo BrandãoandClaude Opus 5.5 112ffd4386 feat(shipwrecks): period picker like air accidents, sharper icons
- Replace the four era chips with the start and end year pickers the
  air-accidents layer uses (the same RowRange control, ported as is);
  the era colours stay as a legend under the row.
- Rasterize the boat marker at 144 px so large markers stay sharp.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-05 04:49:36 -03:00

14 lines
525 B
JavaScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { eraOf } from './eras.js';
test('each wreck falls in one era', () => {
assert.equal(eraOf({ year: 1588 }), 'before-1900');
assert.equal(eraOf({ year: null, ancient: true }), 'before-1900');
assert.equal(eraOf({ year: 1900 }), '1900-1945');
assert.equal(eraOf({ year: 1945 }), '1900-1945');
assert.equal(eraOf({ year: 1946 }), 'after-1945');
assert.equal(eraOf({ year: null }), 'undated');
assert.equal(eraOf(null), 'undated');
});