Jest works by replacing or spying on properties of objects (like fs.statSync when fs is imported as a whole). The issue with a named import is that there's no object or property available to mock