gdharness 1.3.65 → 1.3.66

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/cli.js +9 -3
  2. package/package.json +1 -1
package/build/cli.js CHANGED
@@ -51071,9 +51071,15 @@ function selectTests(projectPath, asked, given) {
51071
51071
  return { ok: false, reason: `${said}: none of them declares a func test_ at the top level.` };
51072
51072
  }
51073
51073
  const written = declared.map((one) => `${nameOf(one.suite)}:${one.test}`);
51074
- const close = nearest(suiteNamed === null ? test : `${nameOf(suiteNamed)}:${test}`, [
51075
- ...new Set(suiteNamed === null ? declared.map((one) => one.test) : written)
51076
- ]);
51074
+ const bare = (name) => name.replace(/^test_/, "");
51075
+ const inSuite = suiteNamed === null ? declared : declared.filter((one) => one.suite === suitePath || nameOf(one.suite) === suiteNamed);
51076
+ const spell = (one) => suiteNamed === null ? one.test : `${nameOf(one.suite)}:${one.test}`;
51077
+ const close = [
51078
+ ...new Set([
51079
+ ...nearest(bare(test), [...new Set(inSuite.map((one) => bare(one.test)))]).flatMap((name) => inSuite.filter((one) => bare(one.test) === name).map(spell)),
51080
+ ...suiteNamed === null ? [] : declared.filter((one) => one.test === test).map(spell)
51081
+ ])
51082
+ ];
51077
51083
  return {
51078
51084
  ok: false,
51079
51085
  reason: close.length > 0 ? `${said}. The nearest ${close.length === 1 ? "is" : "are"} ${close.join(", ")}.` : `${said}. The cases there are ${written.slice(0, 12).join(", ")}${written.length > 12 ? `, and ${written.length - 12} more` : ""}.`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gdharness",
3
- "version": "1.3.65",
3
+ "version": "1.3.66",
4
4
  "mcpName": "io.github.Aureliolo/gdharness",
5
5
  "description": "A harness for driving a Godot 4 project from an agent: editor addons, a runtime bridge into the running game, an MCP server in front of them, and a CLI that installs and diagnoses the Godot side.",
6
6
  "type": "module",