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.
$ 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.
One thought on “Running Dojo DOH tests in a browser without a web server”
Thank you, it helped me a lot to make a testable distribution of my CSV parsing library.