From 46f2d03162069a0daab09867bf47d97fd1410736 Mon Sep 17 00:00:00 2001 From: Steven Burnett Date: Tue, 12 Jul 2016 10:42:09 -0600 Subject: [PATCH] update js readme for coverage instructions Change-Id: If92df49446d4786bc47f3e716647b7f82408680f Reviewed-on: https://gerrit.instructure.com/84995 Reviewed-by: Clay Diffrient Tested-by: Jenkins Product-Review: Steven Burnett QA-Review: Steven Burnett --- doc/testing_javascript.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/testing_javascript.md b/doc/testing_javascript.md index 6823b336aa1..79cca8955c0 100644 --- a/doc/testing_javascript.md +++ b/doc/testing_javascript.md @@ -62,4 +62,12 @@ see a few failures there. Now navigate in your browser to http://phantom.docker and your tests will run inside the browser you have open (in addition to PhantomJS). This will give you the chance to debug them as well as see how they work in a fully functional browser. Our JS -specs currently run in Chrome so make sure that your tests pass there. \ No newline at end of file +specs currently run in Chrome so make sure that your tests pass there. + +## Javascript Test Coverage + +You can generate code coverage locally by first running `npm install` having webpack +set up( `touch config/WEBPACK`) then running `bundle exec rake js:test` or `npm run webpack-test`. +You should then have a folder in your root directory called `coverage-js` +in which contains an `index.html` which if you open it will show you +the test coverage for all javascript (js, coffee, jsx)