| /expo/packages/@expo/cli/e2e/ |
| H A D | setup.ts | 1 jest.mock('@expo/devcert'); 8 jest.mock('fs/promises'); 10 jest.mock('better-opn'); 11 jest.mock('env-editor'); 12 jest.mock('fs'); 14 jest.mock('ora'); 15 jest.mock('os'); 16 jest.mock('progress'); 18 jest.mock('tempy'); 19 jest.mock('tar'); [all …]
|
| /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 | port.test.ts | 8 jest.mock('../../log'); 9 jest.mock('freeport-async', () => jest.fn(async (port) => port)); 10 jest.mock('../prompts'); 11 jest.mock('../getRunningProcess', () => ({ 12 getRunningProcess: jest.fn(() => null), 17 jest.mocked(freeportAsync).mockResolvedValueOnce(8081); 21 jest.mocked(getRunningProcess).mockReturnValueOnce({ 26 jest.mocked(freeportAsync).mockResolvedValueOnce(8082); 30 jest.mocked(getRunningProcess).mockReturnValueOnce({ 49 jest.mocked(getRunningProcess).mockReturnValueOnce({ [all …]
|
| H A D | delay-test.ts | 4 jest.useRealTimers(); 9 jest.useFakeTimers(); 11 jest.advanceTimersByTime(100); 18 const fn = jest.fn(() => 'd'); 28 const fn = jest.fn(() => ''); 41 jest.useFakeTimers(); 43 const fn = jest.fn(() => new Promise(() => {})); 46 jest.advanceTimersByTime(50); 53 jest.useFakeTimers(); 55 const fn = jest.fn(async () => 'foobar'); [all …]
|
| /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/cli/src/run/android/__tests__/ |
| H A D | runAndroidAsync-test.ts | 8 jest.mock('../../../log'); 10 jest.mock('../../../utils/port'); 13 assembleAsync: jest.fn(async () => {}), 14 installAsync: jest.fn(async () => {}), 17 jest.mock('../resolveDevice', () => ({ 26 jest.mock('../../../utils/env', () => ({ 32 jest.mock('../../startBundler', () => ({ 33 startBundlerAsync: jest.fn(() => ({ 34 startAsync: jest.fn(), 35 getDefaultDevServer: jest.fn(() => ({ [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/src/start/platforms/ios/__tests__/ |
| H A D | ApplePlatformManager-test.ts | 7 jest.mock(`../../../../log`); 8 jest.mock('../simctl'); 9 jest.mock(`../assertSystemRequirements`); 10 jest.mock('../../ExpoGoInstaller'); 11 jest.mock('../ensureSimulatorAppRunning'); 30 getDevServerUrl: jest.fn(), 31 getExpoGoUrl: jest.fn(), 33 manager._getAppIdResolver = jest.fn( 57 getDevServerUrl: jest.fn(), 58 getExpoGoUrl: jest.fn(), [all …]
|
| /expo/packages/expo-dev-launcher/ |
| H A D | setupTests.ts | 3 global.fetch = jest.fn().mockResolvedValue({ 11 jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper'); 13 jest.mock('react-native-reanimated', () => { 23 jest.mock('react-native/Libraries/Components/Switch/Switch', () => { 37 jest.mock('./bundle/native-modules/DevLauncherInternal'); 38 jest.mock('./bundle/native-modules/DevLauncherAuth'); 39 jest.mock('./bundle/native-modules/DevMenuPreferences'); 40 jest.mock('./bundle/providers/QueryProvider'); 57 jest.mock('react-native-safe-area-context', () => { 65 jest.mock('@react-navigation/native', () => { [all …]
|
| /expo/packages/@expo/cli/src/run/ios/__tests__/ |
| H A D | runIosAsync-test.ts | 12 jest.mock('../../hints', () => ({ 13 logProjectLogsLocation: jest.fn(), 14 logDeviceArgument: jest.fn(), 17 jest.mock('../../../log'); 19 jest.mock('../../../utils/port'); 36 startBundlerAsync: jest.fn(() => ({ 37 startAsync: jest.fn(), 49 jest.mock('../XcodeBuild', () => ({ 50 logPrettyItem: jest.fn(), 55 jest.mock('../launchApp', () => ({ [all …]
|
| H A D | launchApp-test.ts | 9 jest.mock('../../../log'); 11 jest.mock('../../../utils/env', () => ({ 20 installAppAsync: jest.fn(), 26 jest.mock('../../../start/platforms/ios/simctlLogging', () => ({ 28 getStreamer: jest.fn(() => ({ attachAsync: jest.fn() })), 32 jest.mock('../appleDevice/installOnDeviceAsync', () => ({ 33 getAppDeltaDirectory: jest.fn(() => '/mock_delta'), 34 installOnDeviceAsync: jest.fn(async () => ''), 48 startAsync: jest.fn(), 49 getDefaultDevServer: jest.fn(() => ({ [all …]
|
| /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(),
|
| /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/start/server/middleware/__tests__/ |
| H A D | ManifestMiddleware-test.ts | 19 jest.mock('../../../../log'); 31 getNameFromConfig: jest.fn(jest.requireActual('@expo/config').getNameFromConfig), 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(), [all …]
|
| /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/run/__tests__/ |
| H A D | startBundler-test.ts | 6 jest.mock('../../start/server/DevServerManager', () => ({ 7 DevServerManager: jest.fn(() => ({ 8 startAsync: jest.fn(), 9 getDefaultDevServer: jest.fn(), 10 bootstrapTypeScriptAsync: jest.fn(), 11 watchEnvironmentVariables: jest.fn(), 15 jest.mock('../../utils/interactive', () => ({ 16 isInteractive: jest.fn(() => true), 19 jest.mock('@expo/config', () => ({ 20 getConfig: jest.fn(() => ({ [all …]
|
| /expo/packages/@expo/cli/src/start/doctor/dependencies/__tests__/ |
| H A D | ensureDependenciesAsync-test.ts | 7 jest.mock('@expo/config', () => ({ 8 getConfig: jest.fn(() => ({ 18 jest.mock('../getMissingPackages', () => ({ 19 getMissingPackagesAsync: jest.fn(), 22 installAsync: jest.fn(), 25 isInteractive: jest.fn(() => true), 28 confirmAsync: jest.fn(() => true), 34 jest.mocked(installAsync).mockReset(); 39 jest 68 jest [all …]
|
| /expo/packages/@expo/cli/src/start/server/__tests__/ |
| H A D | AsyncNgrok-test.ts | 8 jest.mock('../../../log'); 9 jest.mock('../../../utils/delay', () => ({ 10 delayAsync: jest.fn(async () => {}), 13 jest.mock('../../../api/settings'); 16 getActiveProcess: jest.fn(), 18 kill: jest.fn(), 23 NgrokResolver: jest.fn(() => ({ 25 get: jest.fn(async () => instance), 33 jest.mock('../../../utils/exit'); 109 const connect = jest.fn(() => { [all …]
|
| /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(); 109 jest.mock('expo-file-system', () => ({ 112 readAsStringAsync: jest.fn(() => Promise.resolve()), 114 deleteAsync: jest.fn(() => Promise.resolve()), 115 moveAsync: jest.fn(() => Promise.resolve()), 116 copyAsync: jest.fn(() => Promise.resolve()), 129 registerAsset: jest.fn(() => 1), 130 getAssetByID: jest.fn(() => ({ [all …]
|
| /expo/packages/jest-expo-puppeteer/ |
| H A D | README.md | 1 # jest-expo-puppeteer 3 This package has been deprecated in favor of using [`jest-puppeteer`][jest-puppeteer] directly. Ori… 7 [Jest documentation][jest] 8 [Jest Puppeteer documentation][jest-puppeteer] 10 [`server` options](https://github.com/smooth-code/jest-puppeteer/tree/master/packages/jest-dev-serv… 14 [jest]: https://facebook.github.io/jest/ 15 [jest-puppeteer]: https://github.com/smooth-code/jest-puppeteer
|
| /expo/packages/@expo/cli/src/run/ios/options/__tests__/ |
| H A D | resolveDevice-test.ts | 18 jest.mock('../../../../log'); 20 jest.mock('../../appleDevice/AppleDevice', () => ({ 21 getConnectedDevicesAsync: jest.fn(async () => [ 33 jest.mock('../promptDevice', () => ({ 35 promptDeviceAsync: jest.fn(async (devices) => devices[0]), 39 assertSystemRequirementsAsync: jest.fn(), 42 jest.mock('../../../../start/platforms/ios/simctl', () => ({ 43 getDevicesAsync: jest.fn(() => [simulator, simulator]), 47 sortDefaultDeviceToBeginningAsync: jest.fn((devices) => devices), 51 ensureSimulatorOpenAsync: jest.fn(async (obj) => obj), [all …]
|
| /expo/packages/@expo/cli/src/start/platforms/android/__tests__/ |
| H A D | emulator-test.ts | 8 jest.mock('../../../../log'); 9 jest.mock('../adb', () => ({ 10 getAttachedDevicesAsync: jest.fn(), 11 isBootAnimationCompleteAsync: jest.fn(), 13 listDevicesAsync: jest.fn(async () => []), 14 startDeviceAsync: jest.fn(async () => {}), 20 stdout: ['avd1', 'avd2'].join(jest.requireActual('os').EOL), 43 unref: jest.fn(), 44 on: jest.fn(), 64 unref: jest.fn(), [all …]
|
| /expo/packages/jest-expo/ |
| H A D | README.md | 1 # jest-expo 7 …To install the compatible version of `jest-expo` and `jest` for your project, run: `npx expo insta… 13 "test": "jest" 15 "jest": { 16 "preset": "jest-expo" 65 "jest": { 66 - "preset": "jest-expo/universal" 69 + { "preset": "jest-expo/ios" }, 89 - `jest-watch-typeahead/filename` 90 - `jest-watch-typeahead/testname` [all …]
|
| /expo/packages/@expo/cli/src/start/server/metro/__tests__/ |
| H A D | MetroBundlerDevServer-test.ts | 10 jest.mock('@expo/config', () => ({ 11 getConfig: jest.fn(() => ({ 20 jest.mock('../instantiateMetro', () => ({ 21 instantiateMetroAsync: jest.fn(async () => ({ 22 middleware: { use: jest.fn() }, 23 server: { listen: jest.fn(), close: jest.fn() }, 27 jest.mock('../../middleware/mutations'); 28 jest.mock('../../../../log'); 29 jest.mock('../../../../utils/analytics/getDevClientProperties', () => jest.fn(() => ({}))); 30 jest.mock('../../../../utils/analytics/rudderstackClient'); [all …]
|
| /expo/packages/@expo/cli/src/run/ios/codeSigning/__tests__/ |
| H A D | resolveCertificateSigningIdentity-test.ts | 12 jest.mock('../../../../log'); 13 jest.mock('../../../../utils/prompts'); 15 fn as jest.MockedFunction<T>; 17 jest.mock('../../../../utils/interactive', () => ({ 18 isInteractive: jest.fn(() => true), 21 jest.mock('../settings', () => ({ 22 getLastDeveloperCodeSigningIdAsync: jest.fn(), 23 setLastDeveloperCodeSigningIdAsync: jest.fn(), 26 jest.mock('../Security', () => ({ 27 resolveCertificateSigningInfoAsync: jest.fn(), [all …]
|