Skip to content

Commit 71a3a26

Browse files
authored
update contribution docs to show test running commands (#3511)
1 parent a0e92ca commit 71a3a26

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

docs/CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,22 @@ Mineflayer has two kind of tests :
2222

2323
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.
2424

25+
26+
## Running tests
27+
You can run tests for Different Minecraft versions using the `-g` flag with npm run mocha_test. For example:
28+
29+
```bash
30+
# Run all tests in all supported versions
31+
npm run test
32+
33+
# Run a specific test in Minecraft 1.20.4
34+
npm run mocha_test -- -g "mineflayer_external 1.20.4v.*exampleBee"
35+
36+
# Run all tests in just version 1.20.4
37+
npm run mocha_test -- -g "mineflayer_external 1.20.4v"
38+
```
39+
40+
2541
### Creating an external test
2642

2743
In order to add an external test now you only need to create a file in [test/externalTests](test/externalTests)

0 commit comments

Comments
 (0)