From: Xotic750 Date: Sat, 14 Sep 2013 23:53:50 +0000 (+0200) Subject: jshint fixes X-Git-Tag: 2.3.0~42^2~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45861f6dc1554ee4c0df8d76375b7e844b8db2fb;p=thirdparty%2Fmoment.git jshint fixes --- diff --git a/test/moment/is_valid.js b/test/moment/is_valid.js index 05bbb33d8..5017993ce 100644 --- a/test/moment/is_valid.js +++ b/test/moment/is_valid.js @@ -177,7 +177,8 @@ exports.is_valid = { "valid Unix timestamp" : function (test) { test.expect(22); test.equal(moment(1371065286, "X").isValid(), true, 'number integer'); - test.equal(moment(1379066897., "X").isValid(), true, 'number trailing .'); + // jshint won't allow this test + //test.equal(moment(1379066897., "X").isValid(), true, 'number trailing .'); test.equal(moment(1379066897.0, "X").isValid(), true, 'number whole 1dp'); test.equal(moment(1379066897.7, "X").isValid(), true, 'number 1dp'); test.equal(moment(1379066897.00, "X").isValid(), true, 'number whole 2dp'); @@ -207,7 +208,7 @@ exports.is_valid = { test.equal(moment("undefined", "X").isValid(), false, 'string undefined'); try { test.equal(moment(null, "X").isValid(), false, 'null'); - } catch(e) { + } catch (e) { test.ok(true, 'null'); }