test(export): stale-group + same-date ordinal coverage; comment/guard polish
This commit is contained in:
@@ -237,6 +237,16 @@ describe('buildSampleIndex', () => {
|
||||
expect(idx.get('a1').get(250).date).toContain('2026-07-01');
|
||||
expect(idx.get('a1').get(260).date).toContain('2026-07-03');
|
||||
});
|
||||
it('# days reach counts per-status, not per-distinct-date (same-day statuses get separate ordinals)', () => {
|
||||
const sameDay = [
|
||||
{ animal_id: 'z1', date: '2026-07-01T08:00:00Z', analysis_summary: { total: 1 } },
|
||||
{ animal_id: 'z1', date: '2026-07-01T20:00:00Z', analysis_summary: { total: 2 } },
|
||||
];
|
||||
const idx = buildSampleIndex(sameDay, '__days__', []);
|
||||
expect(idx.get('z1').has(1)).toBe(true);
|
||||
expect(idx.get('z1').has(2)).toBe(true);
|
||||
expect(idx.get('z1').has(3)).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
import { buildSubjectSeriesMatrix } from '../src/lib/dataExport';
|
||||
|
||||
Reference in New Issue
Block a user