a quick and dirty is to mock the variable in the jest files and avoid the import altogether:
jest.mock("~/config", () => ({ ENV_VARIABLE: "//MOCK_BASE_PATH/api/v0" }));
you may need to re-export the file from a ts
file:
~/config.ts
export const ENV_VARIABLE = import.meta.env.VITE_ENV_VARIABLE