Index: branches/JSTesting/docs/hooks.txt |
— | — | @@ -1526,6 +1526,16 @@ |
1527 | 1527 | loader request or generating HTML output. |
1528 | 1528 | &$resourceLoader: ResourceLoader object |
1529 | 1529 | |
| 1530 | +'ResourceLoaderTestModules': let you add new javascript testing modules. This is called after the addition of 'qunit' and MediaWiki testing ressources. |
| 1531 | +&testModules: array of javascript testing modules. 'qunit' is feed using tests/qunit/QUnitTestResources.php. |
| 1532 | +&RessourceLoader object |
| 1533 | +To add a new qunit module named 'myext.tests': |
| 1534 | +testModules['qunit']['myext.tests'] = array( |
| 1535 | + 'script' => 'extension/myext/tests.js', |
| 1536 | + 'dependencies' => <any module dependency you might have> |
| 1537 | +); |
| 1538 | +For qunit framework, the mediawiki.tests.qunit.testrunner dependency will be added to any module. |
| 1539 | + |
1530 | 1540 | 'RevisionInsertComplete': called after a revision is inserted into the DB |
1531 | 1541 | &$revision: the Revision |
1532 | 1542 | $data: the data stored in old_text. The meaning depends on $flags: if external |