X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=auto_tests%2Ftests%2Fdate_formats.js;fp=auto_tests%2Ftests%2Fdate_formats.js;h=d15567b2562b02ac34e791fdef3b14075c1829da;hb=3123ca57f71d145bb5bcc4a2f754d3dff3225346;hp=05a62c676d1335d4427f406d3a245512eef2ed9f;hpb=26ee953643ccd2d32e38e6b60b20e6a01c1dc9ba;p=dygraphs.git diff --git a/auto_tests/tests/date_formats.js b/auto_tests/tests/date_formats.js index 05a62c6..d15567b 100644 --- a/auto_tests/tests/date_formats.js +++ b/auto_tests/tests/date_formats.js @@ -3,15 +3,15 @@ * * @author dan@dygraphs.com (Dan Vanderkam) */ -var dateFormatsTestCase = TestCase("date-formats"); +describe("date-formats", function() { -dateFormatsTestCase.prototype.setUp = function() { -}; +beforeEach(function() { +}); -dateFormatsTestCase.prototype.tearDown = function() { -}; +afterEach(function() { +}); -dateFormatsTestCase.prototype.testISO8601 = function() { +it('testISO8601', function() { // Format: YYYY-MM-DDTHH:MM:SS.ddddddZ // The "Z" indicates UTC, so this test should pass regardless of the time // zone of the machine on which it is run. @@ -19,11 +19,11 @@ dateFormatsTestCase.prototype.testISO8601 = function() { // Firefox <4 does not support this format: // https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Date/parse if (navigator.userAgent.indexOf("Firefox/3.5") == -1) { - assertEquals(946816496789, Dygraph.dateParser("2000-01-02T12:34:56.789012Z")); + assert.equal(946816496789, Dygraph.dateParser("2000-01-02T12:34:56.789012Z")); } -}; +}); -dateFormatsTestCase.prototype.testHyphenatedDate = function() { +it('testHyphenatedDate', function() { // Format: YYYY-MM-DD HH:MM // Midnight February 2, 2000, UTC @@ -36,5 +36,7 @@ dateFormatsTestCase.prototype.testHyphenatedDate = function() { zp(d.getDate()) + ' ' + zp(d.getHours()) + ':' + zp(d.getMinutes()); - assertEquals(Date.UTC(2000, 1, 2), Dygraph.dateParser(str)); -}; + assert.equal(Date.UTC(2000, 1, 2), Dygraph.dateParser(str)); +}); + +});