more linting

This commit is contained in:
Gareth Jones 2013-05-29 08:29:30 +10:00
parent f24db59523
commit 20f80ff775

View File

@ -1,23 +1,24 @@
"use strict";
var vows = require('vows') var vows = require('vows')
, assert = require('assert') , assert = require('assert')
, dateFormat = require('../lib/date_format'); , dateFormat = require('../lib/date_format');
vows.describe('date_format').addBatch({ vows.describe('date_format').addBatch({
'Date extensions': { 'Date extensions': {
topic: function() { topic: function() {
return new Date(2010, 0, 11, 14, 31, 30, 5); return new Date(2010, 0, 11, 14, 31, 30, 5);
}, },
'should format a date as string using a pattern': function(date) { 'should format a date as string using a pattern': function(date) {
assert.equal( assert.equal(
dateFormat.asString(dateFormat.DATETIME_FORMAT, date), dateFormat.asString(dateFormat.DATETIME_FORMAT, date),
"11 01 2010 14:31:30.005" "11 01 2010 14:31:30.005"
); );
}, },
'should default to the ISO8601 format': function(date) { 'should default to the ISO8601 format': function(date) {
assert.equal( assert.equal(
dateFormat.asString(date), dateFormat.asString(date),
'2010-01-11 14:31:30.005' '2010-01-11 14:31:30.005'
); );
}
} }
}
}).export(module); }).export(module);