This patch adds developer documentation in the docs/ directory. The documentation is written using sphinx. We also include an npm command to build the documentation (ie npm run docs). Closes-bug: 1651106 Change-Id: Ifcce40e1727ddb5eb7cac8586cb41d6f2a3e78d0
1.3 KiB
1.3 KiB
Testing
Single test run
npm test(alternatively runkarma start --single-run)npm run lintto run ESLint
Info on linting setup and .eslintrc rules tweaks.
Tests during development
Start Karma to run tests after every change
npm run test:watch.
Debugging tests
- option
- use
console.login the test and see the output in karma server output
- option
- install karma-chrome-launcher npm module
npm install karma-chrome-launcher --save-dev- replace/add 'Chrome' to browsers in
karma.conf.js- now Karma will launch Chrome to run the tests
- use
debugger;statement in test code to add breakpoints- in Karma Chrome window click 'debug' button and debug in chrome developer tools as usual
- optionally you can use karma-jasmine-html-reporter for better test output
- make sure you don't push those changes to
karma.conf.jsandpackage.jsonas part of your patch