0

I am reading file size of a file using fs.statSync on my application.

When testing, fs.statSync returns size: 0. And when actually running the application, it runs fine and return some size as it is supposed to.

Why could this be happening during testing?

cyclonejet
  • 41
  • 1
  • 6
  • How are you testing it? Are you faking/mocking the file? Is the file not found, since the tests are running in a different space? – Steven Scott Jun 20 '23 at 14:04

0 Answers0