Skip to content

Calling fs.statSync with an active mock causes an error in Node 7.7.1 #197

@not-an-aardvark

Description

@not-an-aardvark

Using [email protected], Node 7.7.1

const mockFs = require('mock-fs');

mockFs({});

fs.statSync('foo')

This returns stats as expected, but then throws an error on the next tick.

Stats { ... }

> TypeError: callback is not a function
    at path/to/mock-fs/lib/binding.js:37:9
    at _combinedTickCallback (internal/process/next_tick.js:73:7)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)

This is probably caused by nodejs/node#11522.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions