| OLD | NEW |
| (Empty) |
| 1 sheriff-o-matic must be run from a server in order to handle Polymer imports cor
rectly. | |
| 2 | |
| 3 1. cd Tools | |
| 4 2. python -m SimpleHTTPServer | |
| 5 3. Load http://localhost:8000/GardeningServer/sheriff-o-matic.html | |
| 6 | |
| 7 Dependencies, including Polymer and mocha, must be synced via bower in order for
anything to work. | |
| 8 | |
| 9 INSTALLING NPM/BOWER | |
| 10 The version of npm in apt-get is too old for bower. Instead | |
| 11 install it from http://nodejs.org/download/. | |
| 12 | |
| 13 Install bower with: | |
| 14 sudo npm install -g bower | |
| 15 | |
| 16 SYNCING DEPENDENCIES | |
| 17 1. cd Tools/GardeningServer | |
| 18 2. bower update | |
| 19 3. npm install | |
| 20 | |
| 21 TESTING | |
| 22 The tests can be run in the browser or from the command line. | |
| 23 | |
| 24 In the browser: http://localhost:8000/GardeningServer/test/run-unit-tests.html. | |
| 25 | |
| 26 From the command line: | |
| 27 1. cd Tools/GardeningServer | |
| 28 2. ./node_modules/karma/bin/karma start | |
| 29 | |
| 30 With 'npm install -g karma-cli', you can just use 'karma start'. | |
| 31 | |
| 32 LIBRARIES | |
| 33 sugar: Provides generic syntactic sugar for JavaScript, mostly by extending nati
ve object prototypes. | |
| 34 | |
| 35 karma: test runner. Runs the unit tests in an instance of Chrome and pipes the r
esults to the command line. By default, it watches for changes to files and will
automatically re-run the tests. To run once and exit, use 'karma start --single
-run'. | |
| 36 | |
| 37 mocha: testing framework. Provides good asynchronous and synchronous test suppor
t. Tests run serially, so exceptions are reported for the right test case. | |
| 38 | |
| 39 chai: assertion library. Provides TDD and BDD-style assertions. | |
| OLD | NEW |