From 6e5a32d319ebd8036094865416bf6c602a8c54e8 Mon Sep 17 00:00:00 2001 From: Madlykeanu Date: Mon, 25 Nov 2024 14:55:37 -0700 Subject: [PATCH] update contribution docs to show test running commands --- docs/CONTRIBUTING.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 4ca6412bc..205619c38 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -22,6 +22,22 @@ Mineflayer has two kind of tests : The objective of these tests is to know automatically what works and what doesn't in mineflayer, so it's easier to make mineflayer work. + +## Running tests +You can run tests for Different Minecraft versions using the `-g` flag with npm run mocha_test. For example: + +```bash +# Run all tests in all supported versions +npm run test + +# Run a specific test in Minecraft 1.20.4 +npm run mocha_test -- -g "mineflayer_external 1.20.4v.*exampleBee" + +# Run all tests in just version 1.20.4 +npm run mocha_test -- -g "mineflayer_external 1.20.4v" +``` + + ### Creating an external test In order to add an external test now you only need to create a file in [test/externalTests](test/externalTests)