// jestSetup.ts jest.mock('expo-sqlite', () => { return { openDatabaseAsync: async (name: string) => { const {DatabaseSync} = require("node:sqlite") const db = new DatabaseSync(':memory:'); return { closeAsync: jest.fn(() => db.close()), executeSql: jest.fn((sql: string) => db.exec(sql)), runAsync: jest.fn(async (sql: string, params = []) => { const stmt = db.prepare(sql); stmt.run(params) }), getFirstAsync: jest.fn(async (sql : string, params = []) => { const stmt = db.prepare(sql) const result = stmt.run(params); return stmt.all(params)[0] }) }; }, }; });