Modify ↓
Ticket #3872 (closed feature: fixed)
enable delaying test start
| Reported by: | joern | Owned by: | joern |
|---|---|---|---|
| Priority: | major | Milestone: | 1.3.1 |
| Component: | qunit | Version: | 1.3 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
Currently tests run on $(window).load() which makes it difficult to test code that has its own initializing code - currently the case with TinyMCE.
start()/stop() could be expanded as a mechanism to control that. stop() would be called before window.load is triggered, checking if its already running, and disabling the default start, eg. by setting config.delayStart. runTest() would then check config.delayStart before setting config.block = false. A call to start() should work as usual, without any modifications necessary.
Change History
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

You can actually now specify tests whenever you wish and the execution will begin at that time (you can load tests dynamically, for example).