Obsolete use of QUnit Stop and Start Methods

Oct 13, 2011 at 6:12 PM

I just downloaded the source materials and ran through the setup procedures, including the JavaScript unit testing.  When I ran the unit tests, the unit tests failed to complete.  I tracked the cause down to the fact that the distribution appears to be using the QUnit stop and start methods in an obsolete way.  

Specifically, the stop method is called with a very large number that appears to be a timeout value.  The documentation on the QUnit site says: 

The optional argument allows you to compress multiple stop() calls into one, e.g. stop(2) has the same effect as stop(); stop().

Note: This used to be the timeout argument, which was never recommended for use in non-debugging code. If you need a global timeout, set QUnit.config.testTimeout instead.

I made some adjustments to the tests to bring them into compliance with the currently available copy of QUnit.  Now all of the JavaScript tests pass.  These changes ought to be included in a future distribution or a comment should be made in the setup procedures to indicate which version of the QUnit package should be used. 

Jon Stonecash

Oct 14, 2011 at 5:33 PM

That's a great catch Jon. Thank you for bringing it to our attention. It's interesting that none of our external code reviews caught that. I'll add it to the issue tracker and we'll get the code updated.

Thanks again,

Oct 14, 2011 at 5:34 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.