Since node v14.x you can pass in throwIfNoEntry with the options of stat or statSync and have it return undefined instead of throwing when a file does not exist. This is quite a useful feature, and I use it quite often.
This library does not support it however, so my production code is working fine, but my tests are failing.
Since node v14.x you can pass in
throwIfNoEntrywith the options ofstatorstatSyncand have it returnundefinedinstead of throwing when a file does not exist. This is quite a useful feature, and I use it quite often.This library does not support it however, so my production code is working fine, but my tests are failing.