Skip to content

Commit a397f64

Browse files
committed
Add a section on how to run tests
1 parent fad53f7 commit a397f64

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

CONTRIBUTING.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,18 @@ Please consider the following when making a change:
123123
124124
* Check out the [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/) for guidelines on designing the API.
125125
126+
## Tests
127+
128+
The main test harness is described in the [testsuite documentation](tests/testsuite/README.md). There are several different commands to run different kinds of tests:
129+
130+
- `cargo test --workspace` — This runs all of the unit and integration tests, except for the GUI tests.
131+
- `cargo test --test gui` — This runs the [GUI test harness](#browser-compatibility-and-testing). This does not get run automatically due to its extra requirements.
132+
- `npm run lint` — [Checks the `.js` files](#checking-changes-in-js-files)
133+
- `cargo test --workspace --no-default-features` — Testing without default features helps check that all feature checks are implemented correctly.
134+
- `cargo clippy --workspace --all-targets --no-deps -- -D warnings` — This makes sure that there are no clippy warnings.
135+
- `RUSTDOCFLAGS="-D warnings" cargo doc --workspace --document-private-items --no-deps` — This verifies that there aren't any rustdoc warnings.
136+
- `cargo fmt --check` — Verifies that everything is formatted correctly.
137+
126138
## Making a pull-request
127139
128140
When you feel comfortable that your changes could be integrated into mdBook, you can create a pull-request on GitHub.

0 commit comments

Comments
 (0)