Skip to content

Commit 09dc022

Browse files
abacaphiliacleebyron
authored andcommitted
Document regression test steps. (#1405)
* Document regression test steps. * Move license to the bottom, add a few words
1 parent e25b48d commit 09dc022

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.github/CONTRIBUTING.md

+44
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,50 @@ Complete your CLA here: <https://code.facebook.com/cla>
5454
* Trailing commas,
5555
* Avd abbr wrds.
5656

57+
# Functionality Testing
58+
59+
Run the following command to build the library and test functionality:
60+
```bash
61+
npm run test
62+
```
63+
64+
## Performance Regression Testing
65+
66+
Performance tests run against master and your feature branch.
67+
Make sure to commit your changes in your local feature branch before proceeding.
68+
69+
These commands assume you have a remote named `upstream` amd that you do not already have a local `master` branch:
70+
```bash
71+
git fetch upstream
72+
git checkout -b master upstream/master
73+
```
74+
75+
These commands build `dist` and commit `dist/immutable.js` to `master` so that the regression tests can run.
76+
```bash
77+
npm run test
78+
git add dist/immutable.js -f
79+
git commit -m 'perf test prerequisite.'
80+
```
81+
82+
Switch back to your feature branch, and run the following command to run regression tests:
83+
```bash
84+
npm run test
85+
npm run perf
86+
```
87+
88+
Sample output:
89+
```bash
90+
> immutable@4.0.0-rc.9 perf ~/github.com/facebook/immutable-js
91+
> node ./resources/bench.js
92+
93+
List > builds from array of 2
94+
Old: 678,974 683,071 687,218 ops/sec
95+
New: 669,012 673,553 678,157 ops/sec
96+
compare: 1 -1
97+
diff: -1.4%
98+
rme: 0.64%
99+
```
100+
57101
## License
58102

59103
By contributing to Immutable.js, you agree that your contributions will be

0 commit comments

Comments
 (0)