Minimal fixture#
const C = require('./ios/Yuva/ContactCore.js');
const now = Date.now();
const state = {
w: { try: 50000 }, cardBalance: 0, earn: [], tx: [],
platform: { providers: { 'bank-demo': {
status: 'available', observedAt: now
} } }
};
C.migrate(state, now);
const api = C.createServices(() => state, () => {}, {
now: () => now, wait: async () => {}
});Run the checks#
From the app checkout, run node --test tests/contact.test.cjs. The fixture seeds fictional contacts, history and one outstanding obligation. It does not replay historical cash movements into the starting wallet.
Test failures#
Set contact.failNextPayment to true to exercise a declined transfer. Mark a mock provider unavailable or age its observation time to exercise stale data. Never use real identifiers, credentials or funds in these fixtures.