File tree 1 file changed +44
-0
lines changed
1 file changed +44
-0
lines changed Original file line number Diff line number Diff line change @@ -54,6 +54,50 @@ Complete your CLA here: <https://code.facebook.com/cla>
54
54
* Trailing commas,
55
55
* Avd abbr wrds.
56
56
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
+
57
101
## License
58
102
59
103
By contributing to Immutable.js, you agree that your contributions will be
You can’t perform that action at this time.
0 commit comments