MCPcopy Create free account
hub / github.com/callstack/react-native-paper / mockPlatform

Function mockPlatform

src/styles/__tests__/fonts.test.js:121–130  ·  view source on GitHub ↗
(OS)

Source from the content-addressed store, hash-verified

119};
120
121const mockPlatform = (OS) => {
122 jest.resetModules();
123
124 jest.doMock('react-native', () => ({
125 Platform: {
126 OS,
127 select: (objs) => objs[OS] ?? objs.default ?? objs.ios,
128 },
129 }));
130};
131
132const loadFonts = () => {
133 let configureFonts;

Callers 1

fonts.test.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…