Home
last modified time | relevance | path

Searched refs:mock (Results 1 – 25 of 301) sorted by relevance

12345678910>>...13

/expo/packages/@expo/cli/e2e/
H A Dsetup.ts1 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-status-bar/src/__tests__/
H A DsetStatusBarStyle-test.ts9 const mock = jest.fn(); constant
10 mockProperty(ReactNativeStatusBar, 'setBarStyle', mock, () => {
12 expect(mock).toHaveBeenCalledWith('dark-content', undefined);
19 const mock = jest.fn(); constant
20 mockProperty(ReactNativeStatusBar, 'setBarStyle', mock, () => {
23 expect(mock).toHaveBeenCalledWith('light-content', undefined);
29 const mock = jest.fn(); constant
30 mockProperty(ReactNativeStatusBar, 'setBarStyle', mock, () => {
33 expect(mock).toHaveBeenCalledWith('light-content', true);
H A DsetStatusBarTranslucent-test.ts8 const mock = jest.fn(); constant
9 mockProperty(ReactNativeStatusBar, 'setTranslucent', mock, () => {
11 expect(mock).toHaveBeenCalledWith(false);
H A DsetStatusBarBackgroundColor-test.ts8 const mock = jest.fn(); constant
9 mockProperty(ReactNativeStatusBar, 'setBackgroundColor', mock, () => {
11 expect(mock).toHaveBeenCalledWith('#000', true);
H A DsetStatusBarHidden-test.ts8 const mock = jest.fn(); constant
9 mockProperty(ReactNativeStatusBar, 'setHidden', mock, () => {
11 expect(mock).toHaveBeenCalledWith(false, 'none');
H A DsetStatusBarNetworkActivityIndicatorVisible-test.ts8 const mock = jest.fn(); constant
9 mockProperty(ReactNativeStatusBar, 'setNetworkActivityIndicatorVisible', mock, () => {
11 expect(mock).toHaveBeenCalledWith(false);
/expo/packages/expo-dev-launcher/
H A DsetupTests.ts11 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', () => {
/expo/packages/@expo/cli/src/run/android/__tests__/
H A DrunAndroidAsync-test.ts8 jest.mock('../../../log');
10 jest.mock('../../../utils/port');
12 jest.mock('../../../start/platforms/android/gradle', () => ({
17 jest.mock('../resolveDevice', () => ({
26 jest.mock('../../../utils/env', () => ({
32 jest.mock('../../startBundler', () => ({
/expo/packages/expo-modules-test-core/android/src/main/java/org/unimodules/test/core/
H A DUnimoduleMocks.kt24 val mock: T = mockk(relaxed = relaxed) in mockkInternalModule() constant
25 every { mock.exportedInterfaces } returns listOf(asInterface) in mockkInternalModule()
26 return mock in mockkInternalModule()
29 private fun mockInternalModules(mock: ModuleRegistry, internalModules: List<InternalModule>) { in mockInternalModules()
31 mock.mockInternalModule(it) in mockInternalModules()
33 every { mock.getModule<Any>(any()) } returns null in mockInternalModules()
36 private fun mockExternalModules(mock: ModuleRegistry, exportedModules: List<ExportedModule>) { in mockExternalModules()
38 every { mock.getExportedModule(it.name) } returns it in mockExternalModules()
40 every { mock.getExportedModule(any()) } returns null in mockExternalModules()
/expo/packages/expo-dev-menu/
H A DsetupTests.ts5 jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
7 jest.mock('react-native/Libraries/Components/Switch/Switch', () => {
21 jest.mock('./app/native-modules/DevMenu');
22 jest.mock('./app/native-modules/DevLauncher');
39 jest.mock('react-native-safe-area-context', () => {
/expo/packages/expo-modules-autolinking/src/__tests__/
H A DReactImportsPatcher-test.ts5 jest.mock('fs-extra');
35 expect(mockFsWriteFile.mock.calls[0][1]).toBe(`\
59 expect(mockFsWriteFile.mock.calls[0][1]).toBe(`\
83 expect(mockFsWriteFile.mock.calls[0][1]).toBe(`\
107 expect(mockFsWriteFile.mock.calls[0][1]).toBe(`\
122 expect(mockFsWriteFile.mock.calls[0]).toBeUndefined();
/expo/packages/@expo/cli/src/run/ios/__tests__/
H A DrunIosAsync-test.ts12 jest.mock('../../hints', () => ({
17 jest.mock('../../../log');
19 jest.mock('../../../utils/port');
21 jest.mock('../options/resolveDevice', () => ({
29 jest.mock('../../../utils/env', () => ({
35 jest.mock('../../startBundler', () => ({
41 jest.mock('../../../start/platforms/ios/AppleDeviceManager', () => ({
49 jest.mock('../XcodeBuild', () => ({
55 jest.mock('../launchApp', () => ({
H A DlaunchApp-test.ts9 jest.mock('../../../log');
11 jest.mock('../../../utils/env', () => ({
17 jest.mock('../../../start/platforms/ios/AppleDeviceManager', () => ({
26 jest.mock('../../../start/platforms/ios/simctlLogging', () => ({
32 jest.mock('../appleDevice/installOnDeviceAsync', () => ({
/expo/packages/expo-keep-awake/src/__tests__/
H A Dindex-test.native.ts24 expect(mockActivate.mock.calls.length).toBe(1);
25 expect(mockDeactivate.mock.calls.length).toBe(1);
31 expect(mockActivate.mock.calls.length).toBe(1);
32 expect(mockDeactivate.mock.calls.length).toBe(1);
33 expect(mockDeactivate.mock.calls[0][0]).toEqual('tag');
/expo/packages/expo-yarn-workspaces/__tests__/
H A Dwebpack.js4 jest.mock('@expo/webpack-config', () => {
35 const [lastEnvArgument] = expoWebpackConfig.mock.calls[expoWebpackConfig.mock.calls.length - 1];
56 const [lastEnvArgument] = expoWebpackConfig.mock.calls[expoWebpackConfig.mock.calls.length - 1];
/expo/packages/@expo/cli/src/run/ios/options/__tests__/
H A DresolveDevice-test.ts18 jest.mock('../../../../log');
20 jest.mock('../../appleDevice/AppleDevice', () => ({
33 jest.mock('../promptDevice', () => ({
38 jest.mock('../../../../start/platforms/ios/assertSystemRequirements', () => ({
42 jest.mock('../../../../start/platforms/ios/simctl', () => ({
46 jest.mock('../../../../start/platforms/ios/promptAppleDevice', () => ({
50 jest.mock('../../../../start/platforms/ios/AppleDeviceManager', () => ({
/expo/packages/@expo/fingerprint/src/sourcer/__tests__/
H A DPatchPackage-test.ts7 jest.mock('@expo/spawn-async');
8 jest.mock('fs');
9 jest.mock('fs/promises');
10 jest.mock('/app/package.json', () => ({}), { virtual: true });
H A DSourcer-test.ts6 jest.mock('@expo/spawn-async');
7 jest.mock('fs');
8 jest.mock('fs/promises');
/expo/packages/expo-web-browser/android/src/test/java/expo/modules/webbrowser/
H A DWebBrowserModuleTest.kt54 val mock = mockkCustomTabsActivitiesHelper() in openBrowserAsync() constant
55 every { mock.canResolveIntent(any()) } returns true in openBrowserAsync()
56 initialize(moduleSpy, customTabsActivitiesHelper = mock) in openBrowserAsync()
71 val mock = mockkCustomTabsActivitiesHelper() in openBrowserAsync() constant
72 every { mock.canResolveIntent(any()) } returns false in openBrowserAsync()
73 initialize(moduleSpy, customTabsActivitiesHelper = mock) in openBrowserAsync()
89 val mock = mockkCustomTabsActivitiesHelper() in openBrowserAsync() constant
91 initialize(moduleSpy, customTabsActivitiesHelper = mock) in openBrowserAsync()
109 initialize(moduleSpy, customTabsActivitiesHelper = mock) in openBrowserAsync()
135 initialize(moduleSpy, customTabsActivitiesHelper = mock) in openBrowserAsync()
[all …]
/expo/packages/expo-router/src/testing-library/
H A Dmocks.ts4 jest.mock('react-native-reanimated', () => {
15 jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
21 jest.mock('expo-linking', () => {
/expo/packages/@expo/package-manager/src/utils/__tests__/
H A Dyarn-test.ts8 jest.mock('dns', () => {
21 jest.mock('dns', () => {
32 jest.mock('child_process', () => {
46 jest.mock('child_process', () => {
/expo/packages/expo-router/build/testing-library/
H A Dmocks.js6 jest.mock('react-native-reanimated', () => {
14 jest.mock('react-native/Libraries/Animated/NativeAnimatedHelper');
18 jest.mock('expo-linking', () => {
/expo/packages/jest-expo/src/preset/
H A Dsetup.js40 function mock(property, customMock) { function
72 : property.mock;
73 mockedProperties[propertyName] = mock(property, customMock);
79 const mock = {};
81 mock[key] = mockProperties(definition[key]);
83 return mock;
109 jest.mock('expo-file-system', () => ({
128 jest.mock('react-native/Libraries/Image/AssetRegistry', () => ({
163 jest.mock('expo-modules-core', () => {
/expo/packages/@expo/cli/src/api/user/__tests__/
H A Dactions-test.ts8 jest.mock('../../../log');
9 jest.mock('../../../utils/prompts');
10 jest.mock('../../rest/client', () => {
16 jest.mock('../otp');
17 jest.mock('../user');
/expo/packages/@expo/cli/src/run/__tests__/
H A DstartBundler-test.ts6 jest.mock('../../start/server/DevServerManager', () => ({
15 jest.mock('../../utils/interactive', () => ({
19 jest.mock('@expo/config', () => ({
27 jest.mock('../../start/interface/startInterface', () => ({

12345678910>>...13