diff options
Diffstat (limited to 'doc/guides/contributing')
-rw-r--r-- | doc/guides/contributing/pull-requests.md | 74 |
1 files changed, 3 insertions, 71 deletions
diff --git a/doc/guides/contributing/pull-requests.md b/doc/guides/contributing/pull-requests.md index b83624ac5f..15c31cec71 100644 --- a/doc/guides/contributing/pull-requests.md +++ b/doc/guides/contributing/pull-requests.md @@ -15,7 +15,6 @@ so that you can make the actual changes. This is where we will start. * [Commit message guidelines](#commit-message-guidelines) * [Step 5: Rebase](#step-5-rebase) * [Step 6: Test](#step-6-test) - * [Test Coverage](#test-coverage) * [Step 7: Push](#step-7-push) * [Step 8: Opening the Pull Request](#step-8-opening-the-pull-request) * [Step 9: Discuss and Update](#step-9-discuss-and-update) @@ -237,75 +236,7 @@ And on Windows: > vcbuild test ``` -(See the [Building guide][] for more details.) - -Make sure the linter does not report any issues and that all tests pass. Please -do not submit patches that fail either check. - -If you want to run the linter without running tests, use -`make lint`/`vcbuild lint`. It will run both JavaScript linting and -C++ linting. - -If you are updating tests and just want to run a single test to check it: - -```text -$ python tools/test.py -J --mode=release parallel/test-stream2-transform -``` - -You can execute the entire suite of tests for a given subsystem -by providing the name of a subsystem: - -```text -$ python tools/test.py -J --mode=release child-process -``` - -If you want to check the other options, please refer to the help by using -the `--help` option - -```text -$ python tools/test.py --help -``` - -You can usually run tests directly with node: - -```text -$ ./node ./test/parallel/test-stream2-transform.js -``` - -Remember to recompile with `make -j4` in between test runs if you change code in -the `lib` or `src` directories. - -#### Test Coverage - -It's good practice to ensure any code you add or change is covered by tests. -You can do so by running the test suite with coverage enabled: - -```text -$ ./configure --coverage && make coverage -``` - -A detailed coverage report will be written to `coverage/index.html` for -JavaScript coverage and to `coverage/cxxcoverage.html` for C++ coverage. - -_Note that generating a test coverage report can take several minutes._ - -To collect coverage for a subset of tests you can set the `CI_JS_SUITES` and -`CI_NATIVE_SUITES` variables: - -```text -$ CI_JS_SUITES=child-process CI_NATIVE_SUITES= make coverage -``` - -The above command executes tests for the `child-process` subsystem and -outputs the resulting coverage report. - -Running tests with coverage will create and modify several directories -and files. To clean up afterwards, run: - -```text -make coverage-clean -./configure && make -j4. -``` +(See the [running tests][] section of Building guide for more details.) ### Step 7: Push @@ -661,7 +592,8 @@ If you want to know more about the code review and the landing process, see the [Code of Conduct]: https://github.com/nodejs/admin/blob/master/CODE_OF_CONDUCT.md [Collaborator Guide]: ../../../COLLABORATOR_GUIDE.md [guide for writing tests in Node.js]: ../writing-tests.md +[hiding-a-comment]: https://help.github.com/articles/managing-disruptive-comments/#hiding-a-comment [https://ci.nodejs.org/]: https://ci.nodejs.org/ [IRC in the #node-dev channel]: https://webchat.freenode.net?channels=node-dev&uio=d4 [Onboarding guide]: ../../onboarding.md -[hiding-a-comment]: https://help.github.com/articles/managing-disruptive-comments/#hiding-a-comment +[running tests]: ../../../BUILDING.md#running-tests
\ No newline at end of file |