Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Document Windows quirk
Browse files Browse the repository at this point in the history
erikkemperman committed Oct 25, 2017

Verified

This commit was signed with the committer’s verified signature.
erikkemperman Erik Kemperman
1 parent a27d872 commit e408889
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions test/file-operations.js
Original file line number Diff line number Diff line change
@@ -936,7 +936,13 @@ describe('reflectMetadata', function() {
reflectMetadata(true, symlinkPath, file, function() {
// Not sure why .toEqual doesn't match these
Object.keys(file.stat).forEach(function(key) {
expect(file.stat[key]).toEqual(stat[key]);
// There appears to be a bug in the Windows implementation which causes
// the sync versions of stat and lstat to return unsigned 32-bit ints
// whilst the async versions returns signed 32-bit ints... This affects
// dev but possibly others as well?
if (!isWindows || key !== 'dev') {
expect(file.stat[key]).toEqual(stat[key]);
}
});

done();
@@ -952,7 +958,13 @@ describe('reflectMetadata', function() {
reflectMetadata(false, symlinkPath, file, function() {
// Not sure why .toEqual doesn't match these
Object.keys(file.stat).forEach(function(key) {
expect(file.stat[key]).toEqual(stat[key]);
// There appears to be a bug in the Windows implementation which causes
// the sync versions of stat and lstat to return unsigned 32-bit ints
// whilst the async versions returns signed 32-bit ints... This affects
// dev but possibly others as well?
if (!isWindows || key !== 'dev') {
expect(file.stat[key]).toEqual(stat[key]);
}
});

done();

0 comments on commit e408889

Please sign in to comment.