npm test # Run all tests
npm test:watch # Watch mode
npm test:ui # Interactive UI
npm test:coverage # Coverage reportStatus: β All 42 tests passing
Bun's native test runner is incompatible with this project because:
- React Native Flow Syntax Issue: Bun cannot parse Flow type syntax (
typeof) used in React Native - No Vitest Config Support: Bun doesn't use
vitest.config.tsfor module resolution - Mock Configuration Mismatch: Bun's module aliasing doesn't work the same way as Vitest
error: Unexpected typeof
at /node_modules/react-native/index.js:28:8
import typeof * as ReactNativePublicAPI from './index.js.flow';
Use npm test (which uses Vitest) instead of bun test.
- Test Runner: Vitest v1.6.1
- Environment: jsdom
- Mocking: Manual mocks in
__mocks__/react-native.ts - Setup:
vitest.setup.ts - Config:
vitest.config.ts
tests/- All test files__mocks__/react-native.ts- React Native mock modulevitest.config.ts- Vitest configuration with alias for mocksvitest.setup.ts- Global test setup (mocks, cleanup)bunfig.toml- Bun configuration (documents incompatibility)