Skip to content

Commit

Permalink
Document mock options as an optional parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
aaclayton committed Feb 20, 2022
1 parent ebfc4b7 commit d61b9df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,13 +129,13 @@ function restoreReadFileContext(binding) {
/**
* Swap out the fs bindings for a mock file system.
* @param {Object} config Mock file system configuration.
* @param {Object} options Any filesystem options.
* @param {Object} [options={}] Any filesystem options.
* @param {boolean} options.createCwd Create a directory for `process.cwd()`
* (defaults to `true`).
* @param {boolean} options.createTmp Create a directory for `os.tmpdir()`
* (defaults to `true`).
*/
exports = module.exports = function mock(config, options) {
exports = module.exports = function mock(config, options = {}) {
const system = FileSystem.create(config, options);
const binding = new Binding(system);

Expand Down

0 comments on commit d61b9df

Please # to comment.