From b0bd9c5cf1301e1e8cec753416db9c6cd8994543 Mon Sep 17 00:00:00 2001 From: Victor Woeltjen Date: Wed, 5 Nov 2014 18:06:03 -0800 Subject: [PATCH] [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. --- test.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test.html b/test.html index 2c38316136..23005bd27c 100644 --- a/test.html +++ b/test.html @@ -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([]); }