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.
6 # Run http-server and save its PID
7 http-server
-p
8081 > /dev
/null
&
10 kill -TERM
$SERVER_PID
14 # the following sleep step is not really necessary
15 # as http-server starts almost instantenously;
16 # but letting the server settle might help prevent
17 # possible racing conditions
21 mocha-phantomjs http
://localhost
:8081/auto_tests
/runner.html
"$@"