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

@@ -1,6 +1,6 @@
// 测试全局 Flag 系统存读档:同实例往返、占用状态与存档克隆
import { afterAll, describe, expect, it, vi } from 'vitest';
import { FlagSystem } from './system';
import { FlagSystem } from '../system';
vi.hoisted(() => {
vi.stubGlobal('main', { replayChecking: true });
@@ -28,7 +28,7 @@ vi.hoisted(() => {
});
interface TestModules {
FlagSystem: typeof import('./system').FlagSystem;
FlagSystem: typeof import('../system').FlagSystem;
logger: typeof import('@motajs/common').logger;
}
@@ -37,7 +37,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 commonModule = await import('@motajs/common');
modules = {
FlagSystem: systemModule.FlagSystem,