npm notice run exchange-terminal@0.4.0 test:unit npm notice run node --test tests/unit/*.test.mjs TAP version 13 # Subtest: 发送原键、原请求和身份边界,只执行一次 fetch ok 1 - 发送原键、原请求和身份边界,只执行一次 fetch --- duration_ms: 14.305894 type: 'test' ... # Subtest: 网络失败保持结果未知,不自动重试 ok 2 - 网络失败保持结果未知,不自动重试 --- duration_ms: 0.553158 type: 'test' ... # Subtest: 响应不是 JSON保持结果未知,不自动重试 ok 3 - 响应不是 JSON保持结果未知,不自动重试 --- duration_ms: 0.363482 type: 'test' ... # Subtest: 确定业务错误保留状态码与业务码 ok 4 - 确定业务错误保留状态码与业务码 --- duration_ms: 0.426129 type: 'test' ... # Subtest: 错误/缺失数据集响应不能确认原请求:dataset-b ok 5 - 错误/缺失数据集响应不能确认原请求:dataset-b --- duration_ms: 0.485156 type: 'test' ... # Subtest: 错误/缺失数据集响应不能确认原请求:null ok 6 - 错误/缺失数据集响应不能确认原请求:null --- duration_ms: 0.321895 type: 'test' ... # Subtest: 请求超时只取消等待,AbortError 转成未知结果,定时器被清理 ok 7 - 请求超时只取消等待,AbortError 转成未知结果,定时器被清理 --- duration_ms: 0.473548 type: 'test' ... # Subtest: 未知执行判断 0/RESULT_UNKNOWN ok 8 - 未知执行判断 0/RESULT_UNKNOWN --- duration_ms: 0.104723 type: 'test' ... # Subtest: 未知执行判断 500/FAILED ok 9 - 未知执行判断 500/FAILED --- duration_ms: 0.14527 type: 'test' ... # Subtest: 未知执行判断 503/QUERY_FAILED ok 10 - 未知执行判断 503/QUERY_FAILED --- duration_ms: 0.225258 type: 'test' ... # Subtest: 未知执行判断 401/UNAUTHENTICATED ok 11 - 未知执行判断 401/UNAUTHENTICATED --- duration_ms: 0.080628 type: 'test' ... # Subtest: 未知执行判断 429/RATE_LIMITED ok 12 - 未知执行判断 429/RATE_LIMITED --- duration_ms: 0.034706 type: 'test' ... # Subtest: 未知执行判断 403/CSRF_REJECTED ok 13 - 未知执行判断 403/CSRF_REJECTED --- duration_ms: 0.026739 type: 'test' ... # Subtest: 未知执行判断 403/ORIGIN_REJECTED ok 14 - 未知执行判断 403/ORIGIN_REJECTED --- duration_ms: 0.030912 type: 'test' ... # Subtest: 未知执行判断 409/DATASET_CHANGED ok 15 - 未知执行判断 409/DATASET_CHANGED --- duration_ms: 0.023195 type: 'test' ... # Subtest: 未知执行判断 400/INVALID_ORDER ok 16 - 未知执行判断 400/INVALID_ORDER --- duration_ms: 0.025384 type: 'test' ... # Subtest: 未知执行判断 403/FORBIDDEN ok 17 - 未知执行判断 403/FORBIDDEN --- duration_ms: 0.024886 type: 'test' ... # Subtest: 未知执行判断 409/IDEMPOTENCY_CONFLICT ok 18 - 未知执行判断 409/IDEMPOTENCY_CONFLICT --- duration_ms: 0.023054 type: 'test' ... # Subtest: 非 API 异常的显示与判断有明确默认值 ok 19 - 非 API 异常的显示与判断有明确默认值 --- duration_ms: 0.0557 type: 'test' ... # Subtest: 不存在记录可开始新操作,有效记录保留原键与原金额文本 ok 20 - 不存在记录可开始新操作,有效记录保留原键与原金额文本 --- duration_ms: 1.117717 type: 'test' ... # Subtest: 拒绝恢复:未知版本 ok 21 - 拒绝恢复:未知版本 --- duration_ms: 0.279407 type: 'test' ... # Subtest: 拒绝恢复:其他数据集 ok 22 - 拒绝恢复:其他数据集 --- duration_ms: 0.146158 type: 'test' ... # Subtest: 拒绝恢复:其他账户 ok 23 - 拒绝恢复:其他账户 --- duration_ms: 0.085723 type: 'test' ... # Subtest: 拒绝恢复:短幂等键 ok 24 - 拒绝恢复:短幂等键 --- duration_ms: 0.117187 type: 'test' ... # Subtest: 拒绝恢复:非法幂等字符 ok 25 - 拒绝恢复:非法幂等字符 --- duration_ms: 0.06604 type: 'test' ... # Subtest: 拒绝恢复:外部路径 ok 26 - 拒绝恢复:外部路径 --- duration_ms: 0.153832 type: 'test' ... # Subtest: 拒绝恢复:其他操作路径 ok 27 - 拒绝恢复:其他操作路径 --- duration_ms: 0.113859 type: 'test' ... # Subtest: 拒绝恢复:数组请求体 ok 28 - 拒绝恢复:数组请求体 --- duration_ms: 0.372934 type: 'test' ... # Subtest: 拒绝恢复:金额为数值 ok 29 - 拒绝恢复:金额为数值 --- duration_ms: 0.356958 type: 'test' ... # Subtest: 拒绝恢复:缺字段 ok 30 - 拒绝恢复:缺字段 --- duration_ms: 0.16078 type: 'test' ... # Subtest: 拒绝恢复:伪造身份字段 ok 31 - 拒绝恢复:伪造身份字段 --- duration_ms: 0.07432 type: 'test' ... # Subtest: 损坏 JSON、超长记录与存储拒绝必须抛错,交给 hook 阻止新写 ok 32 - 损坏 JSON、超长记录与存储拒绝必须抛错,交给 hook 阻止新写 --- duration_ms: 0.119473 type: 'test' ... # Subtest: 撤单只允许正整数字符串 ID 且没有请求体 ok 33 - 撤单只允许正整数字符串 ID 且没有请求体 --- duration_ms: 0.294202 type: 'test' ... # Subtest: 管理员注资恢复保留原目标与原因,字段类型严格 ok 34 - 管理员注资恢复保留原目标与原因,字段类型严格 --- duration_ms: 0.164974 type: 'test' ... # Subtest: valid original signed order survives refresh without changing nonce ok 35 - valid original signed order survives refresh without changing nonce --- duration_ms: 4.256201 type: 'test' ... # Subtest: reject changed dataset ok 36 - reject changed dataset --- duration_ms: 0.215092 type: 'test' ... # Subtest: reject changed chain ok 37 - reject changed chain --- duration_ms: 0.111833 type: 'test' ... # Subtest: reject changed contract ok 38 - reject changed contract --- duration_ms: 0.063872 type: 'test' ... # Subtest: reject tampered signed price ok 39 - reject tampered signed price --- duration_ms: 2.548627 type: 'test' ... # Subtest: reject tampered signed quantity ok 40 - reject tampered signed quantity --- duration_ms: 2.567995 type: 'test' ... # Subtest: reject tampered signed nonce ok 41 - reject tampered signed nonce --- duration_ms: 2.529551 type: 'test' ... # Subtest: reject tampered signed deadline ok 42 - reject tampered signed deadline --- duration_ms: 2.347148 type: 'test' ... # Subtest: reject switched wallet ok 43 - reject switched wallet --- duration_ms: 7.913632 type: 'test' ... # Subtest: reject malformed storage ok 44 - reject malformed storage --- duration_ms: 0.384509 type: 'test' ... 1..44 # tests 44 # suites 0 # pass 44 # fail 0 # cancelled 0 # skipped 0 # todo 0 # duration_ms 4064.943633