The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
style(ci): reformat nextest report script and its tests
Steven Enamakel9f275c69aa85
diff --git a/scripts/__tests__/nextest-coverage.test.mjs b/scripts/__tests__/nextest-coverage.test.mjsindex 32b9407650..ed2e2e44e2 100644--- a/scripts/__tests__/nextest-coverage.test.mjs+++ b/scripts/__tests__/nextest-coverage.test.mjs@@ -12,7 +12,8 @@ function report(xml, expected = [], inventory) {try {fs.writeFileSync(`${dir}/junit.xml`, xml);fs.writeFileSync(`${dir}/expected`, expected.join("\n"));- if (inventory) fs.writeFileSync(`${dir}/inventory.json`, JSON.stringify(inventory));+ if (inventory)+ fs.writeFileSync(`${dir}/inventory.json`, JSON.stringify(inventory));let status = 0;try {execFileSync(@@ -69,14 +70,34 @@ test("nextest serialization retains JSON-RPC and multi-server suites", () => {});test("ignored-only binaries remain inventoried without requiring nonexistent JUnit suites", () => {- const xml = '<testsuites><testsuite name="openhuman-cli::active" tests="1"/></testsuites>';- const inventory = { "rust-suites": {- active: { "binary-name": "active", testcases: { runs: { ignored: false, "filter-match": { status: "matches" } } } },- ignored: { "binary-name": "ignored", testcases: { live: { ignored: true, "filter-match": { status: "mismatch", reason: "ignored" } } } },- } };+ const xml =+ '<testsuites><testsuite name="openhuman-cli::active" tests="1"/></testsuites>';+ const inventory = {+ "rust-suites": {+ active: {+ "binary-name": "active",+ testcases: {+ runs: { ignored: false, "filter-match": { status: "matches" } },+ },+ },+ ignored: {+ "binary-name": "ignored",+ testcases: {+ live: {+ ignored: true,+ "filter-match": { status: "mismatch", reason: "ignored" },+ },+ },+ },+ },+ };assert.equal(report(xml, ["active", "ignored"], inventory).status, 0);- assert.equal(report(xml, ["active", "ignored", "missing"], inventory).status, 1);+ assert.equal(+ report(xml, ["active", "ignored", "missing"], inventory).status,+ 1,+ );inventory["rust-suites"].ignored.testcases.live.ignored = false;- inventory["rust-suites"].ignored.testcases.live["filter-match"].status = "matches";+ inventory["rust-suites"].ignored.testcases.live["filter-match"].status =+ "matches";assert.equal(report(xml, ["active", "ignored"], inventory).status, 1);});diff --git a/scripts/ci/nextest-report.mjs b/scripts/ci/nextest-report.mjsindex 70e5952658..a954f4fe58 100644--- a/scripts/ci/nextest-report.mjs+++ b/scripts/ci/nextest-report.mjs@@ -49,7 +49,9 @@ const expected = expectedFile? fs.readFileSync(expectedFile, "utf8").split(/\r?\n/).filter(Boolean): [];const inventory = inventoryFile- ? Object.values(JSON.parse(fs.readFileSync(inventoryFile, "utf8"))["rust-suites"] ?? {})+ ? Object.values(+ JSON.parse(fs.readFileSync(inventoryFile, "utf8"))["rust-suites"] ?? {},+ ): null;const missing = expected.filter((target) => {if (inventory) {@@ -58,9 +60,14 @@ const missing = expected.filter((target) => {// complete selected inventory is ignored may omit its JUnit testsuite.if (!binary) return true;const selected = Object.values(binary.testcases ?? {});- if (selected.length > 0 && selected.every((test) => test.ignored === true)) return false;+ if (selected.length > 0 && selected.every((test) => test.ignored === true))+ return false;}- return !suites.some((suite) => (suite.name === target || suite.name?.endsWith(`::${target}`)) && suite.tests > 0);+ return !suites.some(+ (suite) =>+ (suite.name === target || suite.name?.endsWith(`::${target}`)) &&+ suite.tests > 0,+ );});if (counts.tests === 0 || missing.length > 0) {console.error(