Skip to content

Commit

Permalink
fix(tests, mock): allow mocking netinfostate type for testing (#619)
Browse files Browse the repository at this point in the history
Co-authored-by: Tarik <tarikfatih@actimi.com>
  • Loading branch information
tarikfp and Tarik committed Sep 18, 2022
1 parent 2f0c8b9 commit 956bceb
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions jest/netinfo-mock.js
Expand Up @@ -13,7 +13,21 @@ const defaultState = {
},
};

const NetInfoStateType = {
unknown: "unknown",
none: "none",
cellular: "cellular",
wifi: "wifi",
bluetooth: "bluetooth",
ethernet: "ethernet",
wimax: "wimax",
vpn: "vpn",
other: "other",
};


const RNCNetInfoMock = {
NetInfoStateType,
configure: jest.fn(),
fetch: jest.fn(),
refresh: jest.fn(),
Expand Down

0 comments on commit 956bceb

Please sign in to comment.