chore(framework): TS 测试基建(tsx+node:test) + core 常量
- 补 @types/node(tsconfig types:[node] 所需,原计划遗漏) - tsconfig 加 allowImportingTsExtensions(import 带 .ts 后缀所需) - test:framework 改用 run-framework-tests.mjs 递归枚举(node 20.13 <20.14 不支持 --test glob) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
import { test } from 'node:test';
|
||||
import assert from 'node:assert/strict';
|
||||
import { APP, Route, RECV_TIMEOUT_MS, RECONNECT_INTERVAL_MS, LOGIN_GUARD_MS, SERVER_ROTATE_EVERY } from '../../YouleNexus/assets/framework/core/constants.ts';
|
||||
|
||||
test('框架常量与 docs/protocol 对齐', () => {
|
||||
assert.equal(APP, 'youle');
|
||||
assert.equal(Route.agent, 'agent');
|
||||
assert.equal(Route.room, 'room');
|
||||
assert.equal(Route.platform, 'platform');
|
||||
assert.equal(RECV_TIMEOUT_MS, 30000);
|
||||
assert.equal(RECONNECT_INTERVAL_MS, 10000);
|
||||
assert.equal(LOGIN_GUARD_MS, 4000);
|
||||
assert.equal(SERVER_ROTATE_EVERY, 3);
|
||||
});
|
||||
Reference in New Issue
Block a user