Skip to content

Commit

Permalink
Document Windows quirk
Browse files Browse the repository at this point in the history
  • Loading branch information
erikkemperman committed Oct 25, 2017
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
Expand Up @@ -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();
Expand All @@ -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();
Expand Down

0 comments on commit e408889

Please sign in to comment.