-
Notifications
You must be signed in to change notification settings - Fork 31.3k
doc: improve docs around running javascript tests #49022
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -139,6 +139,28 @@ request. Interesting things to notice: | |||||||||||||||||||||
exit gracefully. Remember that for a test to succeed, it must exit with a | ||||||||||||||||||||||
status code of 0. | ||||||||||||||||||||||
|
||||||||||||||||||||||
## Running tests | ||||||||||||||||||||||
|
||||||||||||||||||||||
All tests can be executed by running the `jstest` target: | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It won't run all the tests, as its name implies it's only a subset of them.
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there is still a catch in this...that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
```bash | ||||||||||||||||||||||
make jstest | ||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||
``` | ||||||||||||||||||||||
|
||||||||||||||||||||||
A filter can be applied to only run specific tests: | ||||||||||||||||||||||
|
||||||||||||||||||||||
```bash | ||||||||||||||||||||||
make jstest test/parallel/test-debugger-pid.js test/sequential/test-debugger-pid.js test/sequential/test-debugger-launch.mjs | ||||||||||||||||||||||
``` | ||||||||||||||||||||||
Comment on lines
+150
to
+154
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think that's true, it runs the full test suite for me.
Suggested change
|
||||||||||||||||||||||
|
||||||||||||||||||||||
A filter can be applied to skip certain single/multiple test cases: | ||||||||||||||||||||||
|
||||||||||||||||||||||
```bash | ||||||||||||||||||||||
make jstest CI_SKIP_TESTS=parallel/test-cluster-bind-privileged-port.js,... | ||||||||||||||||||||||
``` | ||||||||||||||||||||||
|
||||||||||||||||||||||
Note that test paths must be relative to the project and cannot be absolute file paths. | ||||||||||||||||||||||
|
||||||||||||||||||||||
## General recommendations | ||||||||||||||||||||||
|
||||||||||||||||||||||
### Timers | ||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not blocking this pull request but a suggestion for someone motivated to do it: This PR might contain information that we don't have elsewhere, but we do have "how to run tests" information in both BUILDING.md and doc/contributing/pull-requests.md. Not blocking on this pull request for this, but it would probably be good to consolidate how-to-run-tests info in one place and then put links to the One True Source Of Information in the docs that we remove it from. Part of me wants to suggest putting it all in
test/README.md
, but any of the places where it exists now would be fine, including the one being created in this PR.