Skip to content

Document regression test steps. #1405

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

Merged
merged 2 commits into from
Oct 18, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,50 @@ Complete your CLA here: <https://code.facebook.com/cla>
* Trailing commas,
* Avd abbr wrds.

# Functionality Testing

Run the following command to build the library and test functionality:
```bash
npm run test
```

## 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.

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%
```

## License

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