Build test engines from the shared fake instead of literals

Tests that made their own engine object now use createFakeEngine() with
its scripting hooks or an override of the one member under test, so they
follow the contract when it changes. 125 such literals in 74 test files
go down to two that are not globe engines on purpose; report-qa-harness
counts them, and the baseline keeps the number from growing.
This commit is contained in:
German Khokhlov committed 2026-11-10 17:07:27 +04:00
1 parent 3c304502a0
commit 225c1c25c7
76 files changed
+668 -564

No files matched your search

+3 -2
View File
@@ -1,3 +1,4 @@
import { createFakeEngine } from '../globe/testing/fakeEngine.js';
// Cross-feature voice contracts, driven through the real action runner:
// one result contract (engine fields → model payload → voice card), shared
// pointing for imagery, result-set ownership between OSM and the analyst,
@@ -687,7 +688,7 @@ test('an engine switch keeps the last answer for a follow-up on the next engine'
build: () =>
harness({ runnerOptions: { analystMemory, layerEnabledAt } }).runner,
});
run.attach({ engine: { kind: 'cesium' } });
run.attach({ engine: createFakeEngine({ kind: 'cesium' }) });
const first = await run('analyst_query', {
layers: ['flights'],
scope: { kind: 'anywhere' },
@@ -695,7 +696,7 @@ test('an engine switch keeps the last answer for a follow-up on the next engine'
assert.equal(first.ok, true);
// The real runner of the outgoing engine is disposed by the switch.
run.detach();
run.attach({ engine: { kind: 'navara' } });
run.attach({ engine: createFakeEngine({ kind: 'navara' }) });
const followUp = await run('analyst_query', {
layers: ['flights'],
followUp: true,