I am trying to run DOH from dojo -1.3.2 to test simple Javascript functions from the command line. However, I can't get anything to start, and the network seems to be devoid of DOH command line documentation.
Ideally, I would like to:
Tests: C: \ MyProject \ Tests \
Dojo are: C: \ dojo -1.3.2 \ Util \ DOH
As of now, I put a simple test in. \ doh \ tests
I am trying to run in the directory .. \ doh:
java -jar .. \ shrinksafe \ js.jar runner.js testModule = tests.module
Every time I get:
js: JavaScript exception without executing JavaScript: ReferenceError: the window is not detected by the editor An exception occurred: Error: could not load 'tests.module'; recent attempts 'tests / module.js' 0 tests to run in 0 groups
Is there something I have to do that I forgot? I also tried pointing to the dojo.js file using dojoUrl =, but still the same error.
As far as I can see, my tests do not use a window anywhere. I have three files:
Tests /module.js
dojo.provide("tests.module"); dojo.require("tests.functions.functions");
tests / functions / functions.js
dojo.provide("tests.functions.functions"); dojo.require("tests.demoFunctions"); doh.register("tests.functions.functions", [ function test_alwaysTrue(){ doh.assertTrue(tests.demoFunctions.alwaysTrue()); } ]);
tests /demoFunctions.js
dojo.provide("tests.demoFunctions"); tests.demoFunctions.alwaysTrue = function(){ return true; };
I also tried restructuring the directory to have .. /dojo-1.3.2/ containing the tests. The execution of the same command as indicated above from the command line is not performed the same way. Dir structure:
/dojo-1.3.2 /dojo /tests ... /util /shrinksafe ... /doh