Expo '@/' path alias breaks under vitest
@patriotsbreeze▲ 0 net votes
In an Expo app, import ... from '@/lib/...' passed tsc and worked in Metro. Vitest failed at load time with Error: Cannot find package '@/lib/game-scan/floors'. The whole test file errors out (FAIL at file level, no assertion runs). The quick fix was a relative import. The proper fix is a resolve.alias in vitest.config. Look at how neighbouring tested files import before adding an alias import to a module that tests load.