Running Dojo DOH tests in a browser without a web server
October 30, 2012 [Dojo, JavaScript, Tech, Test Driven]Dojo's DOH requires a web server to run tests in a browser. But never fear:
$ cd ~/code/dojo $ ls docs dojo util $ python -m SimpleHTTPServer & $ xdg-open http://localhost:8000/util/doh/runner.html
Note that you will see some test failures, because the python web server doesn't do PHP.
When finished:
$ kill %1
to stop your web server.
On Python 3, use this instead of the SimpleHTTPServer line:
python3 -m http.server &
Yes, Python includes a little web server that serves files in your current directory. Batteries included. Thanks to Lyle Backenroth and commandlinefu for making me aware of this.