推进 INI 面板运行结果摘要 helper
This commit is contained in:
@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
|
||||
|
||||
import {
|
||||
createRunSummary,
|
||||
summarizeRunResult,
|
||||
} from "../../../runtime/ui/ini-panel/run-summary.js";
|
||||
|
||||
const program = {
|
||||
@@ -63,4 +64,26 @@ assert.equal(
|
||||
"override-session/override.json",
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
summarizeRunResult([
|
||||
"canon_event=STRAIGHT_TRAVERSE line=1 x=1 y=2",
|
||||
"run_step phase=execute line=1",
|
||||
"canon_event=STRAIGHT_FEED line=2 x=3 y=4",
|
||||
"message=canon_event=not-a-canonical-prefix",
|
||||
"",
|
||||
].join("\n"), [{}, {}]),
|
||||
{
|
||||
canonicalEventCount: 2,
|
||||
motionSnapshotCount: 2,
|
||||
},
|
||||
);
|
||||
|
||||
assert.deepEqual(
|
||||
summarizeRunResult("", []),
|
||||
{
|
||||
canonicalEventCount: 0,
|
||||
motionSnapshotCount: 0,
|
||||
},
|
||||
);
|
||||
|
||||
console.log("ini_panel_run_summary_node_smoke=ok");
|
||||
|
||||
Reference in New Issue
Block a user