michangarrito/apps/backend/node_modules/@react-native-community/netinfo/jest/netinfo-mock.js
rckrdmrd 48dea7a5d0 feat: Initial commit - michangarrito
Marketplace móvil para negocios locales mexicanos.

Estructura inicial:
- apps/backend (NestJS API)
- apps/frontend (React Web)
- apps/mobile (Expo/React Native)
- apps/mcp-server (Claude MCP Server)
- apps/whatsapp-service (WhatsApp Business API)
- database/ (PostgreSQL DDL)
- docs/ (Documentación)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 04:41:02 -06:00

44 lines
862 B
JavaScript

/**
* @format
*/
/* eslint-env jest */
const defaultState = {
type: 'cellular',
isConnected: true,
isInternetReachable: true,
details: {
isConnectionExpensive: true,
cellularGeneration: '3g',
},
};
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(),
addEventListener: jest.fn(),
useNetInfo: jest.fn(),
};
RNCNetInfoMock.fetch.mockResolvedValue(defaultState);
RNCNetInfoMock.refresh.mockResolvedValue(defaultState);
RNCNetInfoMock.useNetInfo.mockReturnValue(defaultState);
RNCNetInfoMock.addEventListener.mockReturnValue(jest.fn());
module.exports = RNCNetInfoMock;