test(08-01): migrate data-layer tests into __test__ dirs

Move 65 *.test.ts + 6 *.perf.ts across data-{common,base,system,state} into sibling __test__/ (data-state/test -> data-state/__test__), incl. fixtures/floors.json and non-test helpers; rewrite Rule A relative specifiers (+1 depth), keep Rule B unchanged; sync script/test-data-node.ts require paths. Gates: test:ci=66 files, test:perf=6 files, eslint clean, zero config/production changes.
This commit is contained in:
AncTe committed 2026-10-04 17:34:09 +08:00
1 parent 109fad3b29
commit 36d8b4fb3c
75 files changed
+201 -201

No files matched your search

@@ -7,14 +7,14 @@ import {
type ITileStore,
EventTrigger
} from '@user/data-common';
import { type IStateSystem } from '../types';
import { type IStateSystem } from '../../types';
import {
EventExecuteMode,
EventReduceMode,
BlockEventType,
type IBlockEventEnv,
type IGameEventInvocation
} from './types';
} from '../types';
import { AnonTokyoInterpreter } from '@motajs/anon-tokyo';
import { IStateBase } from '@user/data-base';
@@ -58,8 +58,8 @@ const eventReduceModes = {
} as const;
interface TestModules {
EventExecutor: typeof import('./executor').EventExecutor;
GameEventSystem: typeof import('./system').GameEventSystem;
EventExecutor: typeof import('../executor').EventExecutor;
GameEventSystem: typeof import('../system').GameEventSystem;
DefaultHeroMoveTopImpl: typeof import('@user/data-state').DefaultHeroMoveTopImpl;
MapState: typeof import('@user/data-base').MapState;
TileStore: typeof import('@user/data-common').TileStore;
@@ -87,9 +87,9 @@ let modules: TestModules;
beforeAll(async () => {
vi.stubGlobal('main', { replayChecking: true });
vi.stubGlobal('location', { origin: 'http://localhost' });
const executorModule = await import('./executor');
const systemModule = await import('./system');
const stateModule = await import('../../../data-state/src/hero');
const executorModule = await import('../executor');
const systemModule = await import('../system');
const stateModule = await import('../../../../data-state/src/hero');
const baseModule = await import('@user/data-base');
const commonModule = await import('@user/data-common');
modules = {