Problem
components/__tests__/QuickActions.test.tsx fails to run:
FAIL components/__tests__/QuickActions.test.tsx
Cannot find module 'expo-asset' from 'node_modules/expo-font/build/FontLoader.js'
expo-font/build/FontLoader.js requires expo-asset at runtime, but expo-font declares it in neither dependencies nor peerDependencies:
expo-font deps: {"fontfaceobserver":"^2.1.0"}
expo-font peer: {"expo":"*","react":"*","react-native":"*"}
frontend/mobile/package.json doesn't declare it either, and it is absent from node_modules after a clean npm ci. So nothing installs it and the require fails.
Why now
After #686 fixed the AsyncStorage mock, the mobile suite went from 10 failing suites to 1:
before #686 Test Suites: 10 failed, 19 passed, 29 total Tests: 347 passed
after #686 Test Suites: 1 failed, 28 passed, 29 total Tests: 420 passed
Confirmed identically in CI and locally. This is the only thing left keeping Mobile — typecheck & test red.
That matters more than one suite: the job has been red on main for weeks, and PRs have been merged after establishing the red was pre-existing. A permanently-red required check trains everyone to ignore it, which is how a real failure eventually lands. Fixing this turns the check back into a signal.
What to build
Add expo-asset as a direct dependency of frontend/mobile, at the version matching the installed Expo SDK.
Suggested execution
npx expo install expo-asset — use expo install, not plain npm install, so the version is pinned to the SDK's compatible range rather than latest.
- Confirm
npx jest components/__tests__/QuickActions.test.tsx passes.
- Run the full suite and confirm 29/29 suites pass.
- Sanity-check the app still starts (
npx expo start) — this adds a real package, not just a test shim.
Acceptance criteria
Notes
frontend/mobile uses plain npm. Do not use --legacy-peer-deps — it corrupts the lockfile in this workspace.
- Do not "fix" this by mocking
expo-asset in jest.setup.js. The module is genuinely required by a package we ship; the missing dependency is the bug, and mocking it would hide a real gap that could bite at runtime.
Drips Wave · Complexity: Easy · 100 points
Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk
Problem
components/__tests__/QuickActions.test.tsxfails to run:expo-font/build/FontLoader.jsrequiresexpo-assetat runtime, butexpo-fontdeclares it in neitherdependenciesnorpeerDependencies:frontend/mobile/package.jsondoesn't declare it either, and it is absent fromnode_modulesafter a cleannpm ci. So nothing installs it and the require fails.Why now
After #686 fixed the AsyncStorage mock, the mobile suite went from 10 failing suites to 1:
Confirmed identically in CI and locally. This is the only thing left keeping
Mobile — typecheck & testred.That matters more than one suite: the job has been red on
mainfor weeks, and PRs have been merged after establishing the red was pre-existing. A permanently-red required check trains everyone to ignore it, which is how a real failure eventually lands. Fixing this turns the check back into a signal.What to build
Add
expo-assetas a direct dependency offrontend/mobile, at the version matching the installed Expo SDK.Suggested execution
npx expo install expo-asset— useexpo install, not plainnpm install, so the version is pinned to the SDK's compatible range rather than latest.npx jest components/__tests__/QuickActions.test.tsxpasses.npx expo start) — this adds a real package, not just a test shim.Acceptance criteria
expo-assetis declared infrontend/mobile/package.jsonat an SDK-compatible versionnpm ci && npx jestpasses with 0 failing suites — paste the summary lineMobile — typecheck & testis green on the PR (this is the point of the issue; a green local run isn't sufficient evidence)Notes
frontend/mobileuses plainnpm. Do not use--legacy-peer-deps— it corrupts the lockfile in this workspace.expo-assetinjest.setup.js. The module is genuinely required by a package we ship; the missing dependency is the bug, and mocking it would hide a real gap that could bite at runtime.Required: Before submitting, join the contributor Telegram so your work can be tracked and counted toward the Stellar Wave: https://t.me/+fxHXq8f1SwlkZDBk