Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mock-fs 4.3.0 broken on node 8 #208

Closed
AGrzes opened this issue Jun 3, 2017 · 4 comments
Closed

mock-fs 4.3.0 broken on node 8 #208

AGrzes opened this issue Jun 3, 2017 · 4 comments

Comments

@AGrzes
Copy link
Contributor

AGrzes commented Jun 3, 2017

I'm using mock-fs in my tests and they fail on node 8.
I ran the module test suite and there is a lot of errors.
Attached the test log [email protected]

@AGrzes
Copy link
Contributor Author

AGrzes commented Jun 5, 2017

It looks like node 8 is throwing away the values provided to callback by mock-fs.

// Special case of `makeCallback()` that is specific to async `*stat()` calls as
// an optimization, since the data passed back to the callback needs to be
// transformed anyway.
function makeStatsCallback(cb) {
  if (cb === undefined) {
    return rethrow();
  }

  if (typeof cb !== 'function') {
    throw new TypeError('"callback" argument must be a function');
  }

  return function(err) {
    if (err) return cb(err);
    cb(err, statsFromValues());
  };
}

https://github.com/nodejs/node/blob/v8.0.0/lib/fs.js#L139-L155

@AGrzes
Copy link
Contributor Author

AGrzes commented Jun 5, 2017

Related issue #197 and PR nodejs/node#11665

@AGrzes
Copy link
Contributor Author

AGrzes commented Jun 5, 2017

Started work in #209

@tschaub
Copy link
Owner

tschaub commented Jun 11, 2017

Fix published in [email protected]. Thanks @AGrzes.

@tschaub tschaub closed this as completed Jun 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants