Files
pwap/mobile/__mocks__/shared-lib-referral.js
T
pezkuwichain 899d2a3b8b Add moduleNameMapper for shared lib mocks in Jest
Create dedicated mock files for shared/lib modules and map them
in moduleNameMapper for reliable module resolution in CI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 03:40:46 +03:00

12 lines
546 B
JavaScript

// Mock for shared/lib/referral.ts
module.exports = {
initiateReferral: jest.fn(() => Promise.resolve()),
getPendingReferral: jest.fn(() => Promise.resolve(null)),
getReferralCount: jest.fn(() => Promise.resolve(0)),
getReferralInfo: jest.fn(() => Promise.resolve(null)),
calculateReferralScore: jest.fn(() => 0),
getReferralStats: jest.fn(() => Promise.resolve({ totalReferred: 0, pendingCount: 0, confirmedCount: 0 })),
getMyReferrals: jest.fn(() => Promise.resolve([])),
subscribeToReferralEvents: jest.fn(() => jest.fn()),
};