expo-sqlite-mock
JSON →A Jest mock for expo-sqlite that allows testing SQLite-dependent code without a device or emulator. Current stable version is 4.0.0, compatible with expo-sqlite (expo-sqlite >=55) and expo >=55. It replaces expo-sqlite's native calls with better-sqlite3, enabling real SQLite database operations in test environments. Supports custom database file paths via the EXPO_SQLITE_MOCK environment variable for concurrent test isolation. Differentiates from simple mocks by executing actual SQL, catching constraint errors, and integrating with ORMs like drizzle. Release cadence is tied to expo-sqlite major versions, with breaking changes on major version bumps.
Resources
packageexpo-sqlite-mock ↗