import test from 'node:test'; import assert from 'node:assert/strict'; import { assertPiNodeVersion } from '../src/runtime-policy.mjs'; test('client packaging and startup reject unpatched and unverified Node lines', () => { for (const version of ['18.20.8', '22.23.4', '24.16.0', '24.22.0', '25.0.0', '26.12.1', 'v24.22.1-rc.1', 'garbage']) { assert.throws(() => assertPiNodeVersion(version), /请更新完整客户端/); } for (const version of ['v24.22.1', '24.22.2', '24.23.0']) assert.doesNotThrow(() => assertPiNodeVersion(version)); });