Skip to content

Commit

Permalink
Pick test dates far in the future
Browse files Browse the repository at this point in the history
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
mmalecki committed Feb 22, 2015
1 parent 122d1f5 commit 6820b0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/ncp.js
Original file line number Diff line number Diff line change
Expand Up @@ -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.