Renamed tests so that vows will pick them up automatically

This commit is contained in:
Gareth Jones
2012-07-31 14:52:36 +10:00
parent e3a20a1746
commit 40ba24a55d
20 changed files with 1 additions and 1 deletions

23
test/date_format-test.js Normal file
View File

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