test: reformat and expand test coverage

This commit is contained in:
2026-04-20 15:37:15 +08:00
parent b83ff28f60
commit 974c1a828c
3 changed files with 495 additions and 448 deletions
+4 -1
View File
@@ -63,7 +63,10 @@ describe("createGameContext", () => {
registry.register(
"test <value>",
async function (this: CommandRunnerContext<IGameContext>, _ctx, value) {
return this.prompt(createPromptDef("prompt <answer>"), () => "ok");
return this.prompt(
createPromptDef("prompt <answer>"),
(answer) => answer,
);
},
);
@@ -23,7 +23,7 @@ function createTestItem(
id: string,
shapeStr: string,
transform = IDENTITY_TRANSFORM,
): InventoryItem {
): InventoryItem<Record<string, never>> {
const shape = parseShapeString(shapeStr);
return {
id,
File diff suppressed because it is too large Load Diff