From bee4a6224c1c1173f53e82a9a567d2a3b5e69803 Mon Sep 17 00:00:00 2001 From: Stefan Kuhn Date: Fri, 11 Sep 2026 13:20:04 +0200 Subject: [PATCH] fix: make npm test portable to Windows On Windows, the test command runs through two shell layers: GitHub Actions (PowerShell) -> npm cit -> npm test (cmd.exe) -> bats ${CI+-t} test cmd.exe does not understand the POSIX ${CI+-t} expansion. It passes the expression to Bats as an argument, which Bats interprets as a test path and fails before running any tests. The expansion was added in 2019 to select TAP output in CI, but Bats has done that automatically when CI is set since 2014. Remove the redundant expansion so npm test works across platforms without changing CI output. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e99eab0..0c6b6e2 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "src" ], "scripts": { - "test": "bats ${CI+-t} test", + "test": "bats test", "postversion": "git push --follow-tags" }, "devDependencies": {