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

@@ -30,7 +30,7 @@ vi.hoisted(() => {
});
interface TestModules {
PathfindingGraphBuilder: typeof import('./graph').MapGraphBuilder;
PathfindingGraphBuilder: typeof import('../graph').MapGraphBuilder;
MapState: typeof import('@user/data-base').MapState;
TileStore: typeof import('@user/data-common').TileStore;
FaceManager: typeof import('@user/data-common').FaceManager;
@@ -45,7 +45,7 @@ let modules: TestModules;
beforeAll(async () => {
vi.stubGlobal('main', { replayChecking: true });
vi.stubGlobal('location', { origin: 'http://localhost' });
const graphModule = await import('./graph');
const graphModule = await import('../graph');
const baseModule = await import('@user/data-base');
const commonModule = await import('@user/data-common');
const motaModule = await import('@motajs/common');
@@ -14,8 +14,8 @@ import {
type IPassCheckHandler,
type IPassPredicate
} from '@user/data-base';
import { MapGraphBuilder } from './graph';
import { type PathfindingSystem } from './system';
import { MapGraphBuilder } from '../graph';
import { type PathfindingSystem } from '../system';
vi.hoisted(() => {
vi.stubGlobal('main', { replayChecking: true });
@@ -34,7 +34,7 @@ vi.hoisted(() => {
});
interface TestModules {
PathfindingSystem: typeof import('./system').PathfindingSystem;
PathfindingSystem: typeof import('../system').PathfindingSystem;
MapState: typeof import('@user/data-base').MapState;
TileStore: typeof import('@user/data-common').TileStore;
ObjectMover: typeof import('@user/data-common').ObjectMover;
@@ -49,7 +49,7 @@ let modules: TestModules;
beforeAll(async () => {
vi.stubGlobal('main', { replayChecking: true });
vi.stubGlobal('location', { origin: 'http://localhost' });
const systemModule = await import('./system');
const systemModule = await import('../system');
const baseModule = await import('@user/data-base');
const commonModule = await import('@user/data-common');
const motaModule = await import('@motajs/common');
@@ -17,8 +17,8 @@ import {
type IPassCheckHandler,
type IPassPredicate
} from '@user/data-base';
import { type PathfindingSystem } from './system';
import { type IPathfindingStep, type PathCostFunction } from './types';
import { type PathfindingSystem } from '../system';
import { type IPathfindingStep, type PathCostFunction } from '../types';
vi.hoisted(() => {
vi.stubGlobal('main', { replayChecking: true });
@@ -37,7 +37,7 @@ vi.hoisted(() => {
});
interface TestModules {
PathfindingSystem: typeof import('./system').PathfindingSystem;
PathfindingSystem: typeof import('../system').PathfindingSystem;
MapState: typeof import('@user/data-base').MapState;
TileStore: typeof import('@user/data-common').TileStore;
ObjectMover: typeof import('@user/data-common').ObjectMover;
@@ -53,7 +53,7 @@ let modules: TestModules;
beforeAll(async () => {
vi.stubGlobal('main', { replayChecking: true });
vi.stubGlobal('location', { origin: 'http://localhost' });
const systemModule = await import('./system');
const systemModule = await import('../system');
const baseModule = await import('@user/data-base');
const commonModule = await import('@user/data-common');
const motaModule = await import('@motajs/common');