mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-13 04:21:03 +00:00
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>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
// 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()),
|
||||
};
|
||||
Reference in New Issue
Block a user