Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1178)

Unified Diff: Tools/GardeningServer/README-mocha

Issue 411763003: Set up mocha, chai and karma for sheriff-o-matic unit testing. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Tools/GardeningServer/README-mocha
diff --git a/Tools/GardeningServer/README-mocha b/Tools/GardeningServer/README-mocha
new file mode 100644
index 0000000000000000000000000000000000000000..145414f124265ec7208934eacbfa1389c14b2235
--- /dev/null
+++ b/Tools/GardeningServer/README-mocha
@@ -0,0 +1,27 @@
+sheriff-o-matic must be run from a server in order to handle Polymer imports correctly.
+
+1. cd Tools
+2. python -m SimpleHTTPServer
+3. Load http://localhost:8000/GardeningServer/sheriff-o-matic.html
+
+Run the tests via http://localhost:8000/GardeningServer/test/run-unit-tests.html.
+
+From the command line:
+1. cd Tools/GardeningServer
+2. ./node_modules/karma/bin/karma start
+
+This will run the unit tests in Chrome, pipe the results to the command line, and watch the source and test files for changes. With 'npm install -g karma-cli', you can just use 'karma start'. To run once and exit, use 'karma start --single-run'.
+
+Dependencies, including Polymer and mocha, must be synced via bower in order for anything to work.
+
ojan 2014/07/23 01:36:57 Maybe add a section to the readme explaining what
michaelpg 2014/07/23 02:12:01 This is more of a replacement readme for when we s
ojan 2014/07/23 02:38:37 I think you misunderstood me. I was asking for *mo
michaelpg 2014/07/23 03:06:42 Oh, yeah, sorry. I thought you were saying edit th
michaelpg 2014/07/28 20:35:04 Done.
+INSTALLING NPM/BOWER
+The version of npm in apt-get is too old for bower. Instead
+install it from http://nodejs.org/download/.
+
+Install bower with:
+ sudo npm install -g bower
+
+SYNCING DEPENDENCIES
+1. cd Tools/GardeningServer
+2. bower update
+3. npm install

Powered by Google App Engine
This is Rietveld 408576698