Version 1
[yaffs-website] / node_modules / grunt / node_modules / dateformat / test / test_dayofweek.js
diff --git a/node_modules/grunt/node_modules/dateformat/test/test_dayofweek.js b/node_modules/grunt/node_modules/dateformat/test/test_dayofweek.js
new file mode 100644 (file)
index 0000000..7f37407
--- /dev/null
@@ -0,0 +1,15 @@
+var assert = require('assert');
+
+var dateFormat = require('./../lib/dateformat');
+
+describe('dayOfWeek', function() {
+  it('should correctly format the timezone part', function(done) {
+    var start = 10; // the 10 of March 2013 is a Sunday
+    for(var dow = 1; dow <= 7; dow++){
+      var date = new Date('2013-03-' + (start + dow));
+      var N = dateFormat(date, 'N');
+      assert.strictEqual(N, String(dow));
+    }
+    done();
+  });
+});