From d48856dce6a3c23722303fb059aaf3fcb18ae214 Mon Sep 17 00:00:00 2001 From: Timothy Younger Date: Wed, 18 Oct 2017 13:09:30 -0700 Subject: [PATCH 1/2] Document regression test steps. --- .github/CONTRIBUTING.md | 44 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 28c50dcbd4..3c6f5800fa 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -58,3 +58,47 @@ Complete your CLA here: By contributing to Immutable.js, you agree that your contributions will be licensed under its MIT license. + +# Testing + +Run the following command to build and test: +```bash +npm run test +``` + +## Regression Testing + +Performance tests run against master and your feature branch. +Make sure to commit your changes in your local feature branch before proceeding. + +These commands assume you have a remote named `upstream` amd that you do not already have a local `master` branch: +```bash +git fetch upstream +git checkout -b master upstream/master +``` + +These commands build `dist` and commit `dist/immutable.js` to `master` so that the regression tests can run. +```bash +npm run test +git add dist/immutable.js -f +git commit -m 'perf test prerequisite.' +``` + +Switch back to your feature branch, and run the following command to run regression tests: +```bash +npm run test +npm run perf +``` + +Sample output: +```bash +> immutable@4.0.0-rc.9 perf ~/github.com/facebook/immutable-js +> node ./resources/bench.js + +List > builds from array of 2 + Old: 678,974 683,071 687,218 ops/sec + New: 669,012 673,553 678,157 ops/sec + compare: 1 -1 + diff: -1.4% + rme: 0.64% +``` \ No newline at end of file From 021bf6c995bd538fb07946fa693be2210b74a833 Mon Sep 17 00:00:00 2001 From: Lee Byron Date: Wed, 18 Oct 2017 13:12:47 -0700 Subject: [PATCH 2/2] Move license to the bottom, add a few words --- .github/CONTRIBUTING.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 3c6f5800fa..7a66f07891 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -54,19 +54,14 @@ Complete your CLA here: * Trailing commas, * Avd abbr wrds. -## License - -By contributing to Immutable.js, you agree that your contributions will be -licensed under its MIT license. - -# Testing +# Functionality Testing -Run the following command to build and test: +Run the following command to build the library and test functionality: ```bash npm run test ``` -## Regression Testing +## Performance Regression Testing Performance tests run against master and your feature branch. Make sure to commit your changes in your local feature branch before proceeding. @@ -101,4 +96,9 @@ List > builds from array of 2 compare: 1 -1 diff: -1.4% rme: 0.64% -``` \ No newline at end of file +``` + +## License + +By contributing to Immutable.js, you agree that your contributions will be +licensed under its MIT license.