Skip to content

update contribution docs to show test running commands #3511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading