Permalink
Browse files

Pick test dates far in the future

Fixes the test that checks if `ncp` correctly compares `mtime`s in order
to copy newer files over.

The added benefit of this change is that all the current maintainers
will be long dead by the time this commit becomes a problem again.
  • Loading branch information...
1 parent 122d1f5 commit 6820b0fbe3f7400fdb283c741ef88b6d8e2d4994 @mmalecki mmalecki committed Feb 22, 2015
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/ncp.js
View
@@ -184,14 +184,14 @@ describe('ncp', function () {
});
it('change source file mtime and copy', function(cb) {
- fs.utimesSync(src+"/a", new Date().getTime()/1000, new Date('2015-01-01 00:00:00').getTime()/1000);
+ fs.utimesSync(src+"/a", new Date().getTime()/1000, new Date('2099-01-01 00:00:00').getTime()/1000);
ncp(src, out, {modified: true, clobber: false}, function (err) {
fs.stat(out+"/a", function(err, stats) {
- assert.equal(stats.mtime.getTime(), new Date('2015-01-01 00:00:00').getTime());
+ assert.equal(stats.mtime.getTime(), new Date('2099-01-01 00:00:00').getTime());
cb();
});
});
});
});
-});
+});

0 comments on commit 6820b0f

Please sign in to comment.