| /expo/packages/expo-dev-launcher/bundle/functions/__tests__/ |
| H A D | getDevSessionsAsync.test.ts | 4 const mockFns = [fetch] as jest.Mock[]; 12 expect(fetch).not.toHaveBeenCalled(); 16 expect(fetch).toHaveBeenCalledWith( 25 expect(fetch).not.toHaveBeenCalled(); 29 expect(fetch).toHaveBeenCalledWith( 34 expect(fetch).not.toHaveBeenCalledWith( 43 expect(fetch).not.toHaveBeenCalled(); 47 expect(fetch).toHaveBeenCalledWith( 52 expect(fetch).toHaveBeenCalledWith( 61 expect(fetch).not.toHaveBeenCalled(); [all …]
|
| /expo/packages/expo-notifications/src/utils/__tests__/ |
| H A D | updateDevicePushTokenAsync-test.ts | 28 let originalFetch: typeof fetch | undefined; 31 originalFetch = global.fetch; 32 global.fetch = jest.fn(); 36 global.fetch = originalFetch; 40 global.fetch.mockResolvedValue(successResponse); 56 expect(global.fetch).toHaveBeenCalledTimes(1); 62 global.fetch 68 expect(global.fetch).toHaveBeenCalledTimes(3); 78 expect(global.fetch).toHaveBeenCalledTimes(2); 86 global.fetch.mockRejectedValue(new TypeError()); [all …]
|
| /expo/packages/@expo/cli/e2e/__tests__/export/ |
| H A D | server.test.ts | 66 await fetch('http://localhost:3000/methods', { 76 expect(await fetch('http://localhost:3000').then((res) => res.text())).toMatch( 83 expect(await fetch('http://localhost:3000/beta').then((res) => res.text())).toMatch( 86 expect(await fetch('http://localhost:3000/(alpha)/beta').then((res) => res.text())).toMatch( 91 expect(await fetch('http://localhost:3000/blog/123').then((res) => res.text())).toMatch( 97 await fetch('http://localhost:3000/clearly-missing').then((res) => res.text()) 134 const res = await fetch('http://localhost:3000/api/problematic'); 143 const res = await fetch('http://localhost:3000/api/json', { 157 const res = await fetch('http://localhost:3000/api/env-vars', { method: 'POST' }); 178 fetch('http://localhost:3000/api/a/1/2/3').then((r) => r.json()) [all …]
|
| /expo/packages/@expo/metro-runtime/src/async-require/__tests__/ |
| H A D | fetchAsync.test.web.ts | 6 const originalFetch = global.fetch; 10 global.fetch = jest.fn(() => 17 global.fetch = originalFetch; 22 expect(global.fetch).toBeCalledWith('https://example.com', {
|
| /expo/ios/versioned-react-native/ABI47_0_0/ReactNative/scripts/circleci/ |
| H A D | buck_fetch.sh | 49 retry 3 buck fetch ReactAndroid/src/test/java/com/facebook/react/modules 50 retry 3 buck fetch ReactAndroid/src/main/java/com/facebook/react 51 retry 3 buck fetch ReactAndroid/src/main/java/com/facebook/react/shell 52 retry 3 buck fetch ReactAndroid/src/test/... 53 retry 3 buck fetch ReactAndroid/src/androidTest/...
|
| /expo/ios/versioned-react-native/ABI48_0_0/ReactNative/scripts/circleci/ |
| H A D | buck_fetch.sh | 49 retry 3 buck fetch ReactAndroid/src/test/java/com/facebook/react/modules 50 retry 3 buck fetch ReactAndroid/src/main/java/com/facebook/react 51 retry 3 buck fetch ReactAndroid/src/main/java/com/facebook/react/shell 52 retry 3 buck fetch ReactAndroid/src/test/... 53 retry 3 buck fetch ReactAndroid/src/androidTest/...
|
| /expo/packages/@expo/cli/src/start/server/middleware/inspector/__tests__/ |
| H A D | JsInspector-test.ts | 1 import fetch from 'node-fetch'; 36 const mockFetch = fetch as jest.MockedFunction<typeof fetch>; 53 const mockFetch = fetch as jest.MockedFunction<typeof fetch>;
|
| /expo/packages/@expo/metro-runtime/src/location/ |
| H A D | install.native.ts | 48 function wrapFetchWithWindowLocation(fetch: Function & { __EXPO_BASE_URL_POLYFILLED?: boolean }) { 49 if (fetch.__EXPO_BASE_URL_POLYFILLED) { 50 return fetch; 69 return fetch(...props); 88 value: wrapFetchWithWindowLocation(fetch),
|
| /expo/packages/expo-modules-autolinking/scripts/ios/ |
| H A D | autolinking_manager.rb | 30 global_flags = @options.fetch(:flags, {}) 31 tests_only = @options.fetch(:testsOnly, false) 32 include_tests = @options.fetch(:includeTests, false) 124 @options.fetch(:providerName, Constants::MODULES_PROVIDER_FILE_NAME) 134 return !@options.fetch(:testsOnly, false) 156 search_paths = @options.fetch(:searchPaths, @options.fetch(:modules_paths, nil)) 157 ignore_paths = @options.fetch(:ignorePaths, nil) 158 exclude = @options.fetch(:exclude, [])
|
| /expo/packages/@expo/metro-runtime/build/location/ |
| H A D | install.native.js | 41 function wrapFetchWithWindowLocation(fetch) { argument 42 if (fetch.__EXPO_BASE_URL_POLYFILLED) { 43 return fetch; 60 return fetch(...props); 76 value: wrapFetchWithWindowLocation(fetch),
|
| /expo/docs/scripts/ |
| H A D | resource-specs-sync.mjs | 2 import fetch from 'node-fetch'; 10 const response = await fetch(resourceSpecsSource); 12 console.error(`Failed to fetch resource specs from ${resourceSpecsSource}`);
|
| /expo/docs/pages/versions/unversioned/sdk/ |
| H A D | background-fetch.mdx | 3 description: A universal library that provides API for performing background fetch tasks. 4 sourceCodeUrl: 'https://github.com/expo/expo/tree/main/packages/expo-background-fetch' 5 packageName: 'expo-background-fetch' 40 Below is an example that demonstrates how to use `expo-background-fetch`. 47 import * as BackgroundFetch from 'expo-background-fetch'; 50 const BACKGROUND_FETCH_TASK = 'background-fetch'; 64 // and some configuration options for how the background fetch should behave 110 Background fetch status:{' '} 116 Background fetch task name:{' '} 164 src="/static/images/simulate-background-fetch-instruments.png" [all …]
|
| /expo/docs/pages/versions/v49.0.0/sdk/ |
| H A D | background-fetch.mdx | 3 description: A universal library that provides API for performing background fetch tasks. 4 sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-49/packages/expo-background-fetch' 5 packageName: 'expo-background-fetch' 40 Below is an example that demonstrates how to use `expo-background-fetch`. 47 import * as BackgroundFetch from 'expo-background-fetch'; 50 const BACKGROUND_FETCH_TASK = 'background-fetch'; 64 // and some configuration options for how the background fetch should behave 110 Background fetch status:{' '} 116 Background fetch task name:{' '} 164 src="/static/images/simulate-background-fetch-instruments.png" [all …]
|
| /expo/docs/pages/versions/v48.0.0/sdk/ |
| H A D | background-fetch.mdx | 3 description: A universal library that provides API for performing background fetch tasks. 4 sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-48/packages/expo-background-fetch' 5 packageName: 'expo-background-fetch' 40 Below is an example that demonstrates how to use `expo-background-fetch`. 47 import * as BackgroundFetch from 'expo-background-fetch'; 50 const BACKGROUND_FETCH_TASK = 'background-fetch'; 64 // and some configuration options for how the background fetch should behave 110 Background fetch status:{' '} 116 Background fetch task name:{' '} 164 src="/static/images/simulate-background-fetch-instruments.png" [all …]
|
| /expo/docs/pages/versions/v46.0.0/sdk/ |
| H A D | background-fetch.mdx | 3 description: A universal library that provides API for performing background fetch tasks. 4 sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-46/packages/expo-background-fetch' 5 packageName: 'expo-background-fetch' 28 Below is an example that demonstrates how to use `expo-background-fetch`. 35 import * as BackgroundFetch from 'expo-background-fetch'; 38 const BACKGROUND_FETCH_TASK = 'background-fetch'; 52 // and some configuration options for how the background fetch should behave 98 Background fetch status:{' '} 104 Background fetch task name:{' '} 152 src="/static/images/simulate-background-fetch-instruments.png" [all …]
|
| /expo/docs/pages/versions/v47.0.0/sdk/ |
| H A D | background-fetch.mdx | 3 description: A universal library that provides API for performing background fetch tasks. 4 sourceCodeUrl: 'https://github.com/expo/expo/tree/sdk-47/packages/expo-background-fetch' 5 packageName: 'expo-background-fetch' 30 Below is an example that demonstrates how to use `expo-background-fetch`. 37 import * as BackgroundFetch from 'expo-background-fetch'; 40 const BACKGROUND_FETCH_TASK = 'background-fetch'; 54 // and some configuration options for how the background fetch should behave 100 Background fetch status:{' '} 106 Background fetch task name:{' '} 154 src="/static/images/simulate-background-fetch-instruments.png" [all …]
|
| /expo/packages/create-expo/src/__tests__/ |
| H A D | Examples.test.ts | 17 const fetch = typedFetch as jest.MockedFunction<typeof typedFetch>; constant 22 fetch.mockResolvedValue({ ok: true, status: 200 } as any); 27 fetch.mockResolvedValue({ ok: false, status: 404 } as any); 32 fetch.mockResolvedValue({ ok: false, status: 403 } as any); 54 fetch.mockResolvedValue({ ok: true, json: () => Promise.resolve(examples) } as any);
|
| /expo/home/api/__tests__/ |
| H A D | AuthSessions-test.js | 19 originalFetch = global.fetch; 20 global.fetch = jest.fn(); 29 global.fetch = originalFetch; 101 global.fetch.mockReturnValue(
|
| /expo/packages/@expo/cli/src/api/rest/__tests__/ |
| H A D | wrapFetchWithProgress-test.ts | 2 import fetch from 'node-fetch'; 43 await wrapFetchWithProgress(fetch)(url + '/asset', { 74 await wrapFetchWithProgress(fetch)(url + '/asset', {
|
| /expo/packages/@expo/cli/src/api/rest/ |
| H A D | wrapFetchWithBaseUrl.ts | 11 export function wrapFetchWithBaseUrl(fetch: FetchLike, baseUrl: string): FetchLike { 22 return fetch(parsed.toString(), init);
|
| H A D | client.ts | 123 fetch = fetchWithCredentials, 128 fetch?: FetchLike; 135 return fetch; 139 fetch,
|
| /expo/packages/expo-dev-launcher/android/src/main/java/expo/modules/devlauncher/launcher/manifest/ |
| H A D | DevLauncherManifestParser.kt | 5 import expo.modules.devlauncher.helpers.fetch 18 val response = fetch(url, "HEAD", getHeaders()).await(httpClient) in isManifestUrl() 27 val response = fetch(url, "GET", getHeaders()).await(httpClient) in downloadManifest()
|
| /expo/apps/native-component-list/src/screens/ |
| H A D | BackgroundFetchScreen.tsx | 10 } from 'expo-background-fetch'; 18 const BACKGROUND_FETCH_TASK = 'background-fetch'; 19 const LAST_FETCH_DATE_KEY = 'background-fetch-date'; 73 <Text>Last background fetch was invoked at:</Text> 83 Background fetch status:{' '} 104 console.log(`Got background fetch call at date: ${new Date(now).toISOString()}`);
|
| /expo/packages/create-expo/src/ |
| H A D | Examples.ts | 4 import fetch from 'node-fetch'; 30 const response = await fetch('https://api.github.com/repos/expo/examples/contents'); 41 const response = await fetch( 89 const response = await fetch('https://codeload.github.com/expo/examples/tar.gz/master');
|
| /expo/packages/@expo/cli/src/api/graphql/ |
| H A D | client.ts | 15 import fetch from 'node-fetch'; 44 fetch: wrapFetchWithOffline(wrapFetchWithProxy(fetch)),
|