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
Hi, apologies for asking in the issues, but I've had no luck elsewhere.
I have a function that moves a file from a -> b using node's fs.rename(). If a or b are on a different device (such as an NFS mount) then my code picks up the EXDEV error, and performs a copy and deletes the source file instead.
I'm looking to use mock-fs to mock the filesystem for testing purposes, and I'm wondering if anybody here knows how I can simulate an EXDEV error using it?
For instance, can I create 2 mock filesystems, and attempt a move between them to achieve this?
Many thanks
The text was updated successfully, but these errors were encountered:
Hi, apologies for asking in the issues, but I've had no luck elsewhere.
I have a function that moves a file from a -> b using node's
fs.rename()
. Ifa
orb
are on a different device (such as an NFS mount) then my code picks up theEXDEV
error, and performs a copy and deletes the source file instead.I'm looking to use mock-fs to mock the filesystem for testing purposes, and I'm wondering if anybody here knows how I can simulate an
EXDEV
error using it?For instance, can I create 2 mock filesystems, and attempt a move between them to achieve this?
Many thanks
The text was updated successfully, but these errors were encountered: