If you want to ensure that your issue gets fixed fast you should attempt to reproduce the issue in an isolated example application that you can share.
If you'd like to submit a pull request please adhere to the following:
- Conform to code style defined in JSHint and JSCS configuration files using
npm run lint
. - Your code must be tested. Please TDD your code using
npm run tdd
. - Ensure build will pass by running
npm run test
See Testing section below for details.
Please note that you must adhere to each of the aforementioned rules. If you update and rebase the pull request to follow the guidelines your pull request will be re-opened and considered for inclusion.
Tests are written using QUnit, and run by Karma. Code coverage analysis is collected by Istanbul. Static code analysis is performed by JSHint and JSCS. Continuouse Integration testing is powered by Travis CI and Code Climate.
- Clone this repository:
git clone <repository url>
- Install dependencies:
npm install && npm run dependencies
- Run tests locally:
npm test
This command runs all the following:
- npm run lint
- check code style
- npm run tdd
- run all unit tests in PhantomJS
As you can seen by running npm test
, PromiseWindow tests suite is run multiple
times, each time in a different enviromnent (AMD, with jQuery loaded, etc).
To know all available environments, run npm run list
. Each environment has an
associated static HTML file in the
tests directory.
When no environment is specified:
npm test
will run tests in all available environmentnpm run tdd
will run tests in the "native" environment
To run tests in a specific one, set KARMA_ENV
environment variable.
In continuous integration mode, code coverage is generated. This is not suitable in development mode, because instrumented code generated by code coverage analysis tools is not easy to debug.
npm test
will run tests in CI modenpm run tdd
will run tests in development mode
While this is not recommended, CI mode can be anabled by setting CI
environment variable to true
.
While using npm run tdd
, you can debug PhantomJS errors, by accessing the
remote debugger at http://localhost:9000/.