Skip to content

test: select the version under test with MC_VERSION instead of a title grep - #1526

Open
u9g wants to merge 1 commit into
PrismarineJS:masterfrom
u9g:test/select-version-without-grep
Open

test: select the version under test with MC_VERSION instead of a title grep#1526
u9g wants to merge 1 commit into
PrismarineJS:masterfrom
u9g:test/select-version-without-grep

Conversation

@u9g

@u9g u9g commented Sep 7, 2026

Copy link
Copy Markdown
Member

Invariants of the test run:

  • MC_VERSION names the one supported version the version-parameterised suites run against; unset runs all of them.
  • A MC_VERSION that is not in supportedVersions fails the run instead of quietly testing nothing.
  • Every suite runs in every CI job, whether or not its title carries a version.

CI ran mochaTest -- -g <version>v, so a suite only ran if its title carried a Minecraft version. declare_commands handling, lpVec3 and ping have never run in any job.

Depends on #1527: declare_commands handling is the suite this filter was hiding, and it fails until that tree fix lands.

Checked locally: MC_VERSION=1.21.4 selects the 1.21.4 suites plus the three unversioned ones, MC_VERSION=9.9.9 fails with the supported list, and lpVec3 and ping pass.

…e grep

CI ran mochaTest with -g <version>v, so a suite only ran if its title
carried a Minecraft version. The three suites that are not
version-parameterised, declare_commands handling, lpVec3 and ping, never
ran in any job.

The version loops now read the list from test/common/testedVersions,
which honours MC_VERSION and rejects a value that is not a supported
version, so CI selects the version without touching test titles and
every suite runs in every job. Running mocha with no MC_VERSION still
tests every supported version.

declare_commands handling fails until PrismarineJS#1527 lands, which is the tree
fix this filter was hiding.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant