2.3 KiB
2.3 KiB
Contributing
Thank you for your interest in contributing to our fetch
polyfill!
Note that we only accept features that are also described in the official fetch specification. However, the aim of this project is not to implement the complete specification; just the parts that are feasible to emulate using XMLHttpRequest. See Caveats for some examples of features that we are unlikely to implement.
Contributions to this project are released to the public under the project's open source license.
Running tests
Running npm test
will:
- Build the
dist/
files; - Run the test suite in headless Chrome & Firefox;
- Run the same test suite in Web Worker mode.
When editing tests or implementation, keep npm run karma
running:
- You can connect additional browsers by navigating to
http://localhost:9876/
; - Changes to test.js will automatically re-run the tests in all connected browsers;
- When changing fetch.js, re-run tests by executing
make
; - Re-run specific tests with
./node_modules/.bin/karma run -- --grep=<PATTERN>
.
Submitting a pull request
- Fork and clone the repository;
- Create a new branch:
git checkout -b my-branch-name
; - Make your change, push to your fork and submit a pull request;
- Pat your self on the back and wait for your pull request to be reviewed.
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
- Write a good commit message.