Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

test(scripts): reformat long assertions in coverage and lane tests

Steven Enamakeld2d0a4c7b7ed
diff --git a/scripts/__tests__/nextest-coverage.test.mjs b/scripts/__tests__/nextest-coverage.test.mjs
index eed8540eb8..4d7e47a898 100644
--- a/scripts/__tests__/nextest-coverage.test.mjs
+++ b/scripts/__tests__/nextest-coverage.test.mjs
@@ -158,7 +158,11 @@ if (args[0] === 'metadata') {
});
test("storage coverage fails when one expected target is absent despite another running", () => {
- const xml = '<testsuites><testsuite name="openhuman-cli::storage_approvals_e2e" tests="3"/></testsuites>';
+ const xml =
+ '<testsuites><testsuite name="openhuman-cli::storage_approvals_e2e" tests="3"/></testsuites>';
assert.equal(report(xml, ["storage_approvals_e2e"]).status, 0);
- assert.equal(report(xml, ["storage_approvals_e2e", "storage_domains_e2e"]).status, 1);
+ assert.equal(
+ report(xml, ["storage_approvals_e2e", "storage_domains_e2e"]).status,
+ 1,
+ );
});
diff --git a/scripts/__tests__/self-hosted-lanes.test.mjs b/scripts/__tests__/self-hosted-lanes.test.mjs
index 94cf2cb64d..352a0105dd 100644
--- a/scripts/__tests__/self-hosted-lanes.test.mjs
+++ b/scripts/__tests__/self-hosted-lanes.test.mjs
@@ -416,9 +416,17 @@ test("private gates-off, storage, and Tauri execute equivalent coverage suites w
);
assert.match(checks["gate-contract-tests-features"].run, /--test-threads=1/);
assert.match(checks["cron-module-tests"].run, /--test-threads=1/);
- assert.equal(checks["storage-e2e"].env.NEXTEST_EXPECTED_TARGETS, "ci-out/nextest/storage-e2e-expected-targets.txt");
- for (const target of [...checks["storage-e2e"].run.matchAll(/--test (\S+)/g)].map((match) => match[1])) {
- assert.ok(checks["storage-e2e"].run.includes(`'${target}'`), `expected inventory includes ${target}`);
+ assert.equal(
+ checks["storage-e2e"].env.NEXTEST_EXPECTED_TARGETS,
+ "ci-out/nextest/storage-e2e-expected-targets.txt",
+ );
+ for (const target of [
+ ...checks["storage-e2e"].run.matchAll(/--test (\S+)/g),
+ ].map((match) => match[1])) {
+ assert.ok(
+ checks["storage-e2e"].run.includes(`'${target}'`),
+ `expected inventory includes ${target}`,
+ );
}
assert.match(
checks["storage-lib-tests"].run,
@@ -452,7 +460,13 @@ test("private auxiliary coverage reports after failed tests and preserves the fa
},
});
assert.equal(result.status, 17);
- assert.equal(fs.readFileSync(path.join(dir, "expected-targets"), "utf8").trim().split("\n").length, 10);
+ assert.equal(
+ fs
+ .readFileSync(path.join(dir, "expected-targets"), "utf8")
+ .trim()
+ .split("\n").length,
+ 10,
+ );
const commands = fs.readFileSync(calls, "utf8").trim().split("\n");
assert.equal(commands.length, 3);
assert.match(commands[0], /^metadata /);