| /expo/packages/expo-dev-client-components/ |
| H A D | setupTests.js | 3 addEventListener: jest.fn(), 4 announceForAccessibility: jest.fn(), 5 fetch: jest.fn(), 6 isBoldTextEnabled: jest.fn().mockResolvedValue(false), 7 isGrayscaleEnabled: jest.fn().mockResolvedValue(false), 8 isInvertColorsEnabled: jest.fn().mockResolvedValue(false), 12 removeEventListener: jest.fn(), 13 setAccessibilityFocus: jest.fn(), 25 addChangeListener: jest.fn().mockReturnValue({ remove: jest.fn() }), 26 removeChangeListener: jest.fn(), [all …]
|
| /expo/packages/@expo/cli/src/utils/__tests__/ |
| H A D | delay-test.ts | 18 const fn = jest.fn(() => 'd'); constant 20 action: fn, 25 expect(fn).toHaveBeenCalledTimes(1); 28 const fn = jest.fn(() => ''); constant 30 action: fn, 35 expect(fn).toHaveBeenCalledTimes(2); 43 const fn = jest.fn(() => new Promise(() => {})); constant 50 expect(fn).toBeCalled(); 55 const fn = jest.fn(async () => 'foobar'); constant 57 const promise = resolveWithTimeout(fn, { timeout: 50 }); [all …]
|
| H A D | fn-test.ts | 5 const fn = jest.fn(() => 'd'); constant 6 const memoized = memoize(fn); 10 expect(fn).toHaveBeenCalledTimes(1); 16 const fn = jest.fn(async () => 'd'); constant 17 const guard = guardAsync(fn); 21 expect(fn).toHaveBeenCalledTimes(1);
|
| /expo/packages/expo-dev-launcher/bundle/native-modules/__mocks__/ |
| H A D | DevLauncherInternal.ts | 1 export const loadApp = jest.fn().mockResolvedValue(''); 5 export const getBuildInfoAsync = jest.fn().mockResolvedValue({ 11 export const getPendingDeepLink = jest.fn().mockResolvedValue(''); 12 export const addDeepLinkListener = jest.fn().mockImplementation(() => { 14 remove: jest.fn(), 17 export const copyToClipboardAsync = jest.fn().mockResolvedValue(null); 18 export const getRecentlyOpenedApps = jest.fn().mockResolvedValue([]); 19 export const getCrashReport = jest.fn().mockResolvedValue(null); 20 export const loadUpdate = jest.fn().mockResolvedValue(null); 30 export const loadFontsAsync = jest.fn().mockResolvedValue(null); [all …]
|
| /expo/packages/expo-dev-menu/app/native-modules/__mocks__/ |
| H A D | DevMenu.ts | 1 export const hideMenu = jest.fn(); 2 export const closeMenu = jest.fn(); 3 export const reloadAsync = jest.fn(); 4 export const toggleDebugRemoteJSAsync = jest.fn(); 5 export const toggleElementInspectorAsync = jest.fn(); 6 export const toggleFastRefreshAsync = jest.fn(); 7 export const togglePerformanceMonitorAsync = jest.fn(); 8 export const copyToClipboardAsync = jest.fn().mockResolvedValue({}); 10 export const subscribeToOpenEvents = jest.fn(() => { 16 export const subscribeToCloseEvents = jest.fn(() => {
|
| /expo/packages/@expo/cli/__mocks__/ |
| H A D | ora.ts | 1 const ora = jest.fn(() => { 3 start: jest.fn(() => { 4 return { stop: jest.fn(), succeed: jest.fn(), fail: jest.fn() }; 6 stop: jest.fn(), 7 stopAndPersist: jest.fn(), 8 succeed: jest.fn(), 9 fail: jest.fn(),
|
| H A D | webpack-dev-server.ts | 1 export default jest.fn(() => ({ 2 listen: jest.fn(), 3 sendMessage: jest.fn(), 4 close: jest.fn(),
|
| /expo/packages/create-expo/src/__mocks__/ |
| H A D | ora.ts | 1 const ora = jest.fn(() => { 3 start: jest.fn(() => { 4 return { stop: jest.fn(), succeed: jest.fn(), fail: jest.fn() }; 6 stop: jest.fn(), 7 stopAndPersist: jest.fn(), 8 succeed: jest.fn(), 9 fail: jest.fn(),
|
| /expo/packages/@expo/cli/src/__mocks__/ |
| H A D | log.ts | 1 export const time = jest.fn(); 3 export const timeEnd = jest.fn(); 5 export const error = jest.fn(); 7 export const exception = jest.fn(); 9 export const warn = jest.fn(); 11 export const log = jest.fn(); 13 export const debug = jest.fn(); 15 export const clear = jest.fn(); 17 export const exit = jest.fn(() => {
|
| /expo/packages/@expo/cli/src/start/server/middleware/__tests__/ |
| H A D | ManifestMiddleware-test.ts | 33 getConfig: jest.fn(() => ({ 80 setHeader: jest.fn(), 81 end: jest.fn(), 117 setHeader: jest.fn(), 118 end: jest.fn(), 280 const next = jest.fn(); 283 setHeader: jest.fn(), 284 end: jest.fn(), 327 const next = jest.fn(); 330 setHeader: jest.fn(), [all …]
|
| H A D | ExpoMiddleware-test.ts | 34 middleware.handleRequestAsync = jest.fn(); 38 const next = jest.fn(); 41 setHeader: jest.fn(), 42 end: jest.fn(), 73 const next = jest.fn(); 76 setHeader: jest.fn(), 77 end: jest.fn(), 108 middleware.handleRequestAsync = jest.fn(); 111 const next = jest.fn(); 114 setHeader: jest.fn(), [all …]
|
| H A D | ContextModuleSourceMapsMiddleware.test.ts | 6 const writeHead = jest.fn(); 7 const end = jest.fn(); 17 jest.fn() 29 const writeHead = jest.fn(); 30 const end = jest.fn(); 31 const next = jest.fn();
|
| /expo/packages/@expo/cli/src/start/platforms/ios/__tests__/ |
| H A D | ApplePlatformManager-test.ts | 21 AppleDeviceManager.resolveAsync = jest.fn( 30 getDevServerUrl: jest.fn(), 31 getExpoGoUrl: jest.fn(), 33 manager._getAppIdResolver = jest.fn( 36 getAppIdAsync: jest.fn(() => 'dev.bacon.app'), 54 const getCustomRuntimeUrl = jest.fn(() => null); 57 getDevServerUrl: jest.fn(), 58 getExpoGoUrl: jest.fn(), 61 manager._getAppIdResolver = jest.fn( 64 getAppIdAsync: jest.fn(() => 'dev.bacon.app'), [all …]
|
| /expo/packages/@expo/cli/src/start/server/__tests__/ |
| H A D | AsyncNgrok-test.ts | 10 delayAsync: jest.fn(async () => {}), 11 resolveWithTimeout: jest.fn(async (fn) => fn()), 16 getActiveProcess: jest.fn(), 18 kill: jest.fn(), 23 NgrokResolver: jest.fn(() => ({ 24 resolveAsync: jest.fn(async () => instance), 25 get: jest.fn(async () => instance), 30 hasAdbReverseAsync: jest.fn(async () => true), 31 startAdbReverseAsync: jest.fn(async () => true), 109 const connect = jest.fn(() => { [all …]
|
| /expo/packages/expo-sensors/src/__tests__/mocks/ |
| H A D | MockNativeSensorModule.ts | 2 addListener = jest.fn(async () => {}); 3 removeListeners = jest.fn(async () => {}); 4 startObserving = jest.fn(async () => {}); 5 stopObserving = jest.fn(async () => {}); 6 setUpdateInterval = jest.fn(async () => {});
|
| /expo/packages/@expo/cli/src/run/__tests__/ |
| H A D | startBundler-test.ts | 7 DevServerManager: jest.fn(() => ({ 8 startAsync: jest.fn(), 9 getDefaultDevServer: jest.fn(), 10 bootstrapTypeScriptAsync: jest.fn(), 11 watchEnvironmentVariables: jest.fn(), 16 isInteractive: jest.fn(() => true), 20 getConfig: jest.fn(() => ({ 28 startInterfaceAsync: jest.fn(),
|
| /expo/packages/@expo/cli/src/start/server/metro/inspector-proxy/__tests__/ |
| H A D | device.test.ts | 34 jest.fn() // debugger info mock 49 jest.fn() // debugger info mock 63 jest.fn() // debugger info mock 79 jest.fn(), // debugger info mock 80 jest.fn() as any // socket mock 96 jest.fn(), // debugger info mock 97 jest.fn() as any // socket mock 112 jest.fn(), // debugger info mock 113 jest.fn() as any // socket mock 125 const metroBundler: any = { broadcastMessage: jest.fn() }; [all …]
|
| /expo/packages/@expo/cli/src/start/platforms/__tests__/ |
| H A D | AppIdResolver-test.ts | 7 getProjectConfigDescriptionWithPaths: jest.fn(() => 'app.json'), 8 getConfig: jest.fn(() => ({ 25 resolver.hasNativeProjectAsync = jest.fn(async () => true); 26 resolver.getAppIdFromNativeAsync = jest.fn(async () => 'dev.bacon.myapp'); 34 resolver.hasNativeProjectAsync = jest.fn(async () => true); 35 resolver.resolveAppIdFromNativeAsync = jest.fn(() => null); 44 resolver.hasNativeProjectAsync = jest.fn(async () => false); 45 resolver.getAppIdFromConfigAsync = jest.fn(resolver.getAppIdFromConfigAsync); 60 resolver.hasNativeProjectAsync = jest.fn(async () => false); 61 resolver.getAppIdFromConfigAsync = jest.fn(resolver.getAppIdFromConfigAsync);
|
| /expo/packages/jest-expo/src/preset/ |
| H A D | setup.js | 22 prefetchImage: jest.fn(), 47 mockValue = jest.fn(() => Promise.resolve()); 49 mockValue = jest.fn(); 112 readAsStringAsync: jest.fn(() => Promise.resolve()), 113 writeAsStringAsync: jest.fn(() => Promise.resolve()), 114 deleteAsync: jest.fn(() => Promise.resolve()), 115 moveAsync: jest.fn(() => Promise.resolve()), 116 copyAsync: jest.fn(() => Promise.resolve()), 117 makeDirectoryAsync: jest.fn(() => Promise.resolve()), 129 registerAsset: jest.fn(() => 1), [all …]
|
| /expo/packages/@expo/cli/src/run/android/__tests__/ |
| H A D | runAndroidAsync-test.ts | 13 assembleAsync: jest.fn(async () => {}), 14 installAsync: jest.fn(async () => {}), 18 resolveDeviceAsync: jest.fn(async () => ({ 33 startBundlerAsync: jest.fn(() => ({ 34 startAsync: jest.fn(), 35 getDefaultDevServer: jest.fn(() => ({ 36 openCustomRuntimeAsync: jest.fn(),
|
| /expo/home/redux/__mocks__/ |
| H A D | Store.ts | 2 getState: jest.fn(() => ({ 7 dispatch: jest.fn((action) => action), 8 subscribe: jest.fn(() => jest.fn()), 9 replaceReducer: jest.fn(),
|
| /expo/packages/@expo/cli/src/run/ios/__tests__/ |
| H A D | runIosAsync-test.ts | 13 logProjectLogsLocation: jest.fn(), 14 logDeviceArgument: jest.fn(), 22 isSimulatorDevice: jest.fn(() => true), 23 resolveDeviceAsync: jest.fn(async () => ({ 36 startBundlerAsync: jest.fn(() => ({ 37 startAsync: jest.fn(), 50 logPrettyItem: jest.fn(), 51 buildAsync: jest.fn(async () => '...'), 52 getAppBinaryPath: jest.fn(() => '/mock_binary'), 56 launchAppAsync: jest.fn(async () => {}), [all …]
|
| /expo/packages/@expo/cli/src/start/server/metro/__tests__/ |
| H A D | withMetroResolvers.test.ts | 11 const customResolver1 = jest.fn(() => { 14 const customResolver2 = jest.fn(() => { 21 const customResolver3 = jest.fn(() => { 24 const originalResolveRequest = jest.fn(); 49 const customResolver1 = jest.fn(() => { 53 const originalResolveRequest = jest.fn(); 74 const customResolver1 = jest.fn(() => { 78 const originalResolveRequest = jest.fn();
|
| /expo/packages/@expo/cli/src/start/platforms/android/__tests__/ |
| H A D | emulator-test.ts | 10 getAttachedDevicesAsync: jest.fn(), 11 isBootAnimationCompleteAsync: jest.fn(), 13 listDevicesAsync: jest.fn(async () => []), 14 startDeviceAsync: jest.fn(async () => {}), 43 unref: jest.fn(), 44 on: jest.fn(), 64 unref: jest.fn(), 65 on: jest.fn(),
|
| /expo/packages/expo-router/src/__tests__/ |
| H A D | smoke.test.tsx | 56 const Index = jest.fn(() => <Text>Screen</Text>); 68 const Other = jest.fn(() => <Text>Other</Text>); 81 const Layout = jest.fn(() => <Slot />); 98 const RootLayout = jest.fn(() => <Slot />); 99 const AppLayout = jest.fn(() => <Slot />); 100 const TabsLayout = jest.fn(() => <Tabs />); 101 const StackLayout = jest.fn(() => <Stack />); 128 const RootLayout = jest.fn(() => <Slot />); 129 const AppLayout = jest.fn(() => <Stack />); 130 const TabsLayout = jest.fn(() => <Tabs />); [all …]
|