Skip to content

Commit

Permalink
Change time check assertions for modification and access times
Browse files Browse the repository at this point in the history
Signed-off-by: Joern Bernhardt <[email protected]>
  • Loading branch information
McHunkyTrunk committed Jun 22, 2015
1 parent 7574c3e commit be5c6bb
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions lib/copy/__tests__/copy.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ describe('fs-extra', function () {
var fromStat = fs.statSync(a)
var toStat = fs.statSync(b)
if (options.preserveTimestamps) {
assert.deepEqual(toStat.mtime, fromStat.mtime)
assert.deepEqual(toStat.atime, fromStat.atime)
assert.strictEqual(toStat.mtime.getTime(), fromStat.mtime.getTime())
assert.strictEqual(toStat.atime.getTime(), fromStat.atime.getTime())
} else {
assert.notEqual(toStat.mtime, fromStat.mtime)
assert.notEqual(toStat.atime, fromStat.atime)
assert.notEqual(toStat.mtime.getTime(), fromStat.mtime.getTime())
// the access time might actually be the same, so check only modification time
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions lib/copy/__tests__/sync/copy-sync.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -336,11 +336,11 @@ describe('+ copySync()', function () {
var fromStat = fs.statSync(a)
var toStat = fs.statSync(b)
if (options.preserveTimestamps) {
assert.deepEqual(toStat.mtime, fromStat.mtime)
assert.deepEqual(toStat.atime, fromStat.atime)
assert.strictEqual(toStat.mtime.getTime(), fromStat.mtime.getTime())
assert.strictEqual(toStat.atime.getTime(), fromStat.atime.getTime())
} else {
assert.notEqual(toStat.mtime, fromStat.mtime)
assert.notEqual(toStat.atime, fromStat.atime)
assert.notEqual(toStat.mtime.getTime(), fromStat.mtime.getTime())
// the access time might actually be the same, so check only modification time
}
}
}
Expand Down

0 comments on commit be5c6bb

Please sign in to comment.