You can run the test suite using npm commands. You can test the entire project, a specific Minecraft version, or a specific test case using the mocha_test script.
Test everything
Run all tests in the repository:
npm test
Test a specific Minecraft version
Use the -g flag followed by the version string (e.g., 1.12, 1.15.2):
npm run mocha_test -- -g <version>
Test a specific test name
Use the -g flag followed by the name of the test (e.g., bed, useChests, rayTrace):
npm run mocha_test -- -g <test_name>
Example: Test a specific feature for a specific version
To run the block finder test specifically for version 1.18.1:
npm run mocha_test -- -g "1.18.1.*BlockFinder"