Skip to content

Commit eca81d4

Browse files
authored
Add sentence about adding a new crate with unit tests (#258)
Signed-off-by: Tim van der Lippe <TimvdLippe@users.noreply.github.com>
1 parent aaef09b commit eca81d4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/contributing/testing.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,12 @@ with `#[test]` annotations. You can run unit tests with `./mach test-unit`. Exam
2525
./mach test-unit -p servo-net test_fetch_response_is_not_network_error
2626
```
2727

28+
To be able to run unit tests for a new crate, you need to add the name of the crate to
29+
`self_contained_tests` in `python/servo/testing_commands.py`.
30+
2831
Running the whole test-suite can be very memory intensive, you can dampen this behaviour somewhat with
2932
with restricting the amount of compiled crates with `./mach test-unit -j 4`.
3033

31-
3234
## Integration Tests
3335
Tests are located in the `tests` directory.
3436
You'll see that there are a lot of files in there, so finding the proper location for your test is not always obvious.

0 commit comments

Comments
 (0)