From a019aaa34367fe828b2bd5417bf0ab23ce8cfa84 Mon Sep 17 00:00:00 2001 From: Citrons <909229731@qq.com> Date: Tue, 25 Aug 2026 01:34:13 +0800 Subject: [PATCH] =?UTF-8?q?test(FEAT-MO-005):=20=E8=A1=A5=E5=85=85?= =?UTF-8?q?=E6=8E=A2=E9=92=88=E5=9C=B0=E5=9D=80=E8=BE=B9=E7=95=8C=E6=B5=8B?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tools/probes/market-structure-capability.test.mjs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/probes/market-structure-capability.test.mjs b/tools/probes/market-structure-capability.test.mjs index 5f70261..4ec4301 100644 --- a/tools/probes/market-structure-capability.test.mjs +++ b/tools/probes/market-structure-capability.test.mjs @@ -2,7 +2,7 @@ import assert from 'node:assert/strict'; import test from 'node:test'; import { spawnSync } from 'node:child_process'; -import { analyzeTdxRows } from './market-structure-capability.mjs'; +import { analyzeTdxRows, parseArguments } from './market-structure-capability.mjs'; test('帮助信息声明固定的本机数据源边界', () => { const result = spawnSync( @@ -28,3 +28,11 @@ test('TDX 列式序列在 Date 与 Amount 等长且分钟时间戳完整时标 { dateAmountAligned: true, timestampsIntraday: true }, ); }); + +test('探针拒绝非回环地址和错误端口', () => { + assert.throws( + () => parseArguments(['--base-url', 'http://192.168.1.10:8080']), + /127\.0\.0\.1:8080/, + ); + assert.throws(() => parseArguments(['--base-url', 'http://127.0.0.1:9000']), /127\.0\.0\.1:8080/); +});