mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 10:53:59 +00:00
merge main f13c60c into feat/voice-outlines
reconcile voice outlines with main f13c60c, retaining German/Japanese,
Operator HUD retirement and Context/Radio cleanup, named-building
containment, courtyard-hole, non-Latin identity, attribution, cancellation
and antimeridian repairs
keep outline callouts above the open voice preview when an above-panel
slot fits without colliding with another callout,
and clip the compact dock location label on narrow screens
This commit is contained in:
commit
578ebdc030
449 files changed
+30400
-3429
No files matched your search
@@ -0,0 +1,43 @@
|
||||
import test from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { createWorkTrace, recordWorkSlice } from './phaseTiming.js';
|
||||
|
||||
test('unsupported DEV does not create a recorder and absent recording is inert', () => {
|
||||
assert.equal(createWorkTrace(), null);
|
||||
assert.doesNotThrow(() => recordWorkSlice(null, 'unused', 0));
|
||||
});
|
||||
|
||||
test('work intervals preserve raw endpoints and fail closed on bounded-record loss', () => {
|
||||
const trace = { slices: [], dropped: 0 };
|
||||
recordWorkSlice(trace, 'ground-step', 100, 123);
|
||||
assert.deepEqual(trace.slices[0], {
|
||||
phase: 'ground-step',
|
||||
start: 100,
|
||||
end: 123,
|
||||
});
|
||||
for (let i = 1; i <= 16; i += 1)
|
||||
recordWorkSlice(trace, 'ground-step', 200 + i, 201 + i);
|
||||
assert.equal(trace.slices.length, 16);
|
||||
assert.equal(trace.dropped, 1);
|
||||
assert.deepEqual(trace.slices[0], {
|
||||
phase: 'ground-step',
|
||||
start: 100,
|
||||
end: 123,
|
||||
});
|
||||
|
||||
const detail = { index: 0, clampStart: 2, clampEnd: 3 };
|
||||
const nested = { slices: [], dropped: 0 };
|
||||
recordWorkSlice(nested, 'ground-step', 1, 4, detail);
|
||||
assert.deepEqual(nested.slices[0], {
|
||||
phase: 'ground-step',
|
||||
start: 1,
|
||||
end: 4,
|
||||
detail,
|
||||
});
|
||||
|
||||
const unavailable = { slices: Object.freeze([]), dropped: 0 };
|
||||
assert.doesNotThrow(() =>
|
||||
recordWorkSlice(unavailable, 'ground-step', 1, 2, detail),
|
||||
);
|
||||
assert.equal(unavailable.dropped, 1);
|
||||
});
|
||||
Reference in new issue
Block a user