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
The answer is no. Mockfs cannot do it.
First, exec or spawn creates new OS process which is isolated from current nodejs process. Even if you do exec("node some.js") to create another nodejs process, the new process is not affected by mockfs on current process.
Furthermore, ls uses libc to access file system, it's irrelevant to mockfs which only mocks nodejs's fs module.
What is this about?
Mock node's child process
exec
orspawn
?Just wanted to check if there is a possibility of mocking node process.
My question is, will the exec work and list the content from the mock fs?
which is
test.txt
?The text was updated successfully, but these errors were encountered: