test(08-10): cover data-system/data-state gap codes and add loader tests

- eventDispatch: assert codes 171 (missing event id) and 172 (non-boolean reduce result)

- path/system: assert code 182 when binding a foreign CoreState layer

- data-state event: assert code 1001 for an unknown setBlock tile

- loader: new loader.test.ts covering PrefixedJSONCProcessor 66/67, DefaultDataLoaderHook 69/success, and MotaDataLoader public surface (66/67/68/69; 68 recorded unreachable)
This commit is contained in:
AncTe committed 2026-10-08 14:45:10 +08:00
1 parent b932f8cecd
commit 47c6e2c8db
4 files changed
+235

No files matched your search

@@ -610,4 +610,16 @@ describe('pathfinding system', () => {
await result!.controller.onEnd;
expect(result!.controller.done).toBe(true);
});
// 验证向求解器绑定属于其他 CoreState 的图层时告警码 182 并不建立绑定
it('warns code 182 when binding a layer from another CoreState', () => {
const a = createSystem([1, 1, 1], 3);
const b = createSystem([1, 1, 1], 3);
const result = modules.logger.catch(() =>
a.system.finder.useMapLayer(b.layer)
);
expect(result.info.map(info => info.code)).toContain(182);
});
});