tschaub / mock-fs

Configurable mock for the fs module
https://npmjs.org/package/mock-fs
Other
911 stars 86 forks source link

Node 10 has changed how fs.stat works #236

Closed imurchie closed 6 years ago

imurchie commented 6 years ago

After mock-fs does its magic calling code ends up with Stats objects like

Stats {
  dev: undefined,
  mode: undefined,
  nlink: undefined,
  uid: undefined,
  gid: undefined,
  rdev: undefined,
  blksize: undefined,
  ino: undefined,
  size: undefined,
  blocks: undefined,
  atimeMs: undefined,
  mtimeMs: undefined,
  ctimeMs: undefined,
  birthtimeMs: undefined,
  atime: Invalid Date,
  mtime: Invalid Date,
  ctime: Invalid Date,
  birthtime: Invalid Date }

To reproduce: npm run test.

gucong3000 commented 6 years ago

+1

szll commented 6 years ago

+1

BugDiver commented 6 years ago

When are we getting a fix for this?

tschaub commented 6 years ago

Thanks for the report @imurchie. I've put together a fix in #237.

imurchie commented 6 years ago

Amazing! Thank you @tschaub!