Please provide the following:
- SDK Version: ^49.0.0-beta.0
- Platforms(Android/iOS/web/all): all
Ive noticed that EXPO_PUBLIC_
client env vars & TS aliases don’t currently work in jest. You can easily enable this by adding the following to your project.
// ./jest.setup.ts
import * as env from "@expo/env";
import path from "path";
env.load(path.resolve(__dirname));
import type { Config } from "jest";
const config: Config = {
preset: "jest-expo",
moduleNameMapper: {
"@lib/(.*)": "<rootDir>/src/lib/$1",
"@ui/(.*)": "<rootDir>/src/ui/$1",
},
setupFilesAfterEnv: ["<rootDir>/jest.setup.ts"],
};
Replace this section with as much relevant information as possible and any relevant code along with your question.