views:

571

answers:

2

I'm looking at using the Dojo Objective Harness (DOH) for testing some custom JavaScript code. To that end I've read the following article:

http://www.ibm.com/developerworks/web/library/wa-aj-doh/index.html

and I have a question about the test case structure. The example shows that your test case modules in the same parent directory as dojo. This is a bit of a problem for us as we'd like to use DOH in multiple projects without having to include dojo in each and every one.

Does anyone know of a way to setup DOH to use the following structure:

  • dojotoolkit
    • dojo
    • dijit
    • dojox
    • util
  • project1
    • src
    • test
  • project2
    • src
    • test

Thanks...

Simon

+2  A: 
Eugene Lazutkin
Thanks so much Eugene. I don't know how I missed the link to "Medrix Observations: Dojo D.O.H. Unit Testing." when I read over your answer to the previous question.
Simon MacDonald
A: 

This article Unit Testing Custom Code with the Dojo Objective Harness http://www.sitepen.com/blog/2008/04/15/unit-testing-custom-code-with-the-dojo-objective-harness/ should give you what you need. It describes how to write unit tests for custom code in custom places.

Erin Stanfill