I am getting Uncaught Error: ENOENT: no such file or directory, open 'C:\Temp\mockFs\fake\base\path\file.png' when trying to mock out uploading files with needle.
System: Windows 7 x64
node.js: 10.8.0
npm: 6.3.0
needle takes file paths and uploads them onto server via HTTP POST. I am setting a file-system mock before using needle.
I am getting
Uncaught Error: ENOENT: no such file or directory, open 'C:\Temp\mockFs\fake\base\path\file.png'
when trying to mock out uploading files with needle.System:
Windows 7 x64
node.js:10.8.0
npm:6.3.0
needle
takes file paths and uploads them onto server via HTTP POST. I am setting a file-system mock before usingneedle
.The file that uses
needle
:And here is the test suite:
The test is run with
mocha
, with extensions bychai
.