Mocking .env variables in isolation during Jest tests can be useful to test different scenarios without changing the actual .env file. This is helpful for functions that read from the .env file especially in a different scope or context.
getFilePath.ts
export const getFilePath = () => process.env.FILE_PATH;