tschaub / mock-fs

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

Document mock options as an optional parameter #350

Closed aaclayton closed 2 years ago

aaclayton commented 2 years ago

The mock method currently documents its options parameter as being required. This causes annoying code inspection errors in the IDE when passing only a single object as folows:

mock({
  "some-directory": {
    "some-file.txt": "file content"
  }
});

image

This change makes the parameter optional as intended.

3cp commented 2 years ago

Thank you!