[Test] Fix command line testing

Change the way missing test suites are detected by
the test runner; PhantomJS (used for executing tests
from the command line build) does not appear to give
consistent HTTP status codes, so use a more general
try-catch mechanism.

Addresses an issue introduced during ongoing
development of framework layer, WTD-518.
This commit is contained in:
Victor Woeltjen 2014-11-05 18:06:03 -08:00
parent f3e532156d
commit b0bd9c5cf1

View File

@ -50,9 +50,9 @@
xhr.open("GET", file);
xhr.onreadystatechange = function () {
if (xhr.readyState === 4) { // DONE
if (xhr.status === 200) {
try {
callback(JSON.parse(xhr.response));
} else {
} catch (e) {
// No suite defined, so no tests
callback([]);
}