Skip to content

Contributing

monounity edited this page Oct 11, 2016 · 23 revisions

Contributing

Contributions are most welcome and will be accepted if the guidelines in this document are followed, so before creating a pull request, make sure you have done everything in this list:

  • Lint all files using the rules in .eslintrc.js, located in the root of the karma-typescript project.

  • Create as small and descriptive functions and classes as possible.

  • Comment your code where necessary, ie where it otherwise would be hard to understand why something is done in a certain way, not what is being done. Don't litter the code with comments like // create a new array or // set the value.

  • If possible, add new integration tests that covers the new feature or bug fix.

  • Run all the integration tests, no tests should fail.

  • Run all the manual regression tests listed in this document.

Regression testing

Before creating a pull request

  • Make sure the code in example-project and integration-tests compile on command line with tsc.

  • Run the tests in example-project using npm test or npm run dev.

  • Run all integrations tests in integration-tests using npm test or npm run dev.

  • Make changes to any file and make sure it gets picked up by Karma and the compiler.

  • Introduce a syntactic error in a file and check that the compiler produces a diagnostic.

  • Make sure new coverage html files has been created for both the example project and the integration tests and that they contain all the expected tests with remapped coverage.

Clone this wiki locally