Skip to content

Commit a55957e

Browse files
authored
fix: fix next tag release tests guard (#99)
1 parent 0aa1bf4 commit a55957e

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

cli/tests/unit/cli/router.test.mjs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,9 @@ describe("CLI routing", () => {
5555
it("shows version with --version", async () => {
5656
const { code, stdout } = await run(["--version"]);
5757
assert.equal(code, 0);
58-
assert.match(stdout.trim(), /^\d+\.\d+\.\d+$/);
58+
// Allow prerelease suffixes: publish-next.yml bumps to e.g. 1.5.1-next.<ts>.g<sha>
59+
// before `npm publish`, whose prepublishOnly hook re-runs this test
60+
assert.match(stdout.trim(), /^\d+\.\d+\.\d+(-[0-9A-Za-z.-]+)?$/);
5961
});
6062
});
6163

0 commit comments

Comments
 (0)