2 # Starts the http-server and runs mocha-phantomjs-based tests
3 # Note that you must run `npm run build` or `npm run watch` before running this.
4 # Additional arguments are passed to mocha-phantomjs, e.g.
5 # run-tests.sh --grep interaction-model
8 # Run http-server and save its PID
9 http-server
-p
8081 > /dev
/null
&
12 kill -TERM
$SERVER_PID
16 # the following sleep step is not really necessary
17 # as http-server starts almost instantenously;
18 # but letting the server settle might help prevent
19 # possible racing conditions
23 mocha-phantomjs http
://localhost
:8081/auto_tests
/runner.html
"$@"