improved coverage for date_format
This commit is contained in:
@@ -19,6 +19,21 @@ vows.describe('date_format').addBatch({
|
||||
dateFormat.asString(date),
|
||||
'2010-01-11 14:31:30.005'
|
||||
);
|
||||
},
|
||||
/* this test will only pass in Australia (GMT+11) - javascript doesn't
|
||||
provide a way to change or specify a Date's timezone
|
||||
'should provide a ISO8601 with timezone offset format': function(date) {
|
||||
assert.equal(
|
||||
dateFormat.asString(dateFormat.ISO8601_WITH_TZ_OFFSET_FORMAT, date),
|
||||
"2010-01-11T14:31:30+1100"
|
||||
);
|
||||
},
|
||||
*/
|
||||
'should provide a just-the-time format': function(date) {
|
||||
assert.equal(
|
||||
dateFormat.asString(dateFormat.ABSOLUTETIME_FORMAT, date),
|
||||
'14:31:30.005'
|
||||
);
|
||||
}
|
||||
}
|
||||
}).export(module);
|
||||
|
||||
Reference in New Issue
Block a user