Skip to content

Commit

Permalink
update contribution docs to show test running commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Madlykeanu committed Nov 25, 2024
1 parent 3862007 commit 6e5a32d
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6e5a32d

Please sign in to comment.