You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 15, 2024. It is now read-only.
The original Node implementation of rmdirSync throws an error if the directory is not empty. The implementation in memory-fs quietly deletes the directory an all its contents. rmdirSync effectively behaves like rmdirpSync should.
This is a problem when using memory-fs to mock the native file system and trusting that it behaves similarly.
constMemoryFileSystem=require('memory-fs');constfs=newMemoryFileSystem();fs.mkdirpSync('/a/b/c');fs.rmdirSync('/a/b');// This should fail. b is not empty.console.log(fs.readdirSync('/a'));// Empty