X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=DEVELOP.md;h=9a13888c99bb1e9aefb560f3b68856763c7566b1;hb=6eef8c1b9ec7b247ee2b508032bd3ec957d0fb68;hp=71bf785b43af580c1b92c8bae9ed8d4c6330b614;hpb=7bf909a7b076b5296734a6222e62ed1084e9c935;p=dygraphs.git diff --git a/DEVELOP.md b/DEVELOP.md index 71bf785..9a13888 100644 --- a/DEVELOP.md +++ b/DEVELOP.md @@ -8,19 +8,31 @@ This is a step-by-step guide explaining how to do it. To build dygraphs, run - gulp dist + npm run build To run the tests, run: - gulp test + npm run build-tests + npm run test -To iterate on the code, open `tests/demo.html` (or one of the other demos) in your browser. +To iterate on the code, run: -To iterate on a unit test, change `it` to `it.only` in the Mocha test, change the browser from `PhantomJS` to `Chrome` (or whatever you like) and set `singleRun` to `false` in `auto_tests/karma.conf.js`. Then run + npm run watch - ./node_modules/karma/bin/karma start auto_tests/karma.conf.js +and open `tests/demo.html` (or one of the other demos) in your browser. -and hit "DEBUG" in the Karma UI. +To iterate on a unit test, run the `watch` command above and open + + auto_tests/runner.html + +in your browser. You can use the Mocha UI to run just a single test or suite. +Or you can change `it` to `it.only` to do run just one test in code. + +To run a single test from the command line, you can use: + + npm run test -- --grep highlight-series-background + +(Note the extra `--`.) ### dygraphs style