(my-stuff.js) as well as any special dependencies (jQuery plugins,
Backbone, etc).
-4. Edit the "civcrm/tests/qunit/my-stuff/test.js"
+4. Edit the "civicrm/tests/qunit/my-stuff/test.js"
5. To run the test-suite, login to CiviCRM as administrator and visit:
qunit test is part of the core codebase (aka extension="civicrm"),
and suppose the suite is "my-stuff". Then navigate to:
- http://localhost/civicrm/dev/qunit/civicrm/my-stuff
+ http://localhost/civicrm/dev/qunit/civicrm/my-stuff
==== CONVENTIONS ====
* Each QUnit test-suite for CiviCRM lives in a subdirectory of
"tests/qunit/".
-
+
Rationale: Following a predictable naming convention will help us automate
testing/loading across all suites, and it will make the code more recognizable
to other developers.
* Each QUnit test-suite *may* include the file "test.php" to specify
loading of resource files or bundles (such as CSS/JS). The file will
be recognized automatically.
-
+
Rationale: CiviCRM has its own resource-loading conventions. When
preparing a test environment, one needs to load JS/CSS dependencies.
Since there is no autoloader, this is most easily done with CiviCRM's