This project is read-only.
2
Vote

JavaScript Unit Tests Failing

description

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

comments

dosname50 wrote Jun 2, 2012 at 1:40 PM

Hi,

you don't mention about dates in charts...

The home controller JsonGetFleetStatisticSeries action return months without zero based month index.

In client side javascript mstats.charts.js:

_setupDateRange sets datesInDateRange with zero based month index so _filterSeriesByDateRange does not filters data series well because _isDateInRange.