@@ -11,6 +11,41 @@ import execa from 'execa';
11
11
import { Flags } from '..' ;
12
12
import { AndroidProjectConfig } from '@react-native-community/cli-types' ;
13
13
14
+ const gradleTaskOutput = `
15
+ > Task :tasks
16
+
17
+ ------------------------------------------------------------
18
+ Tasks runnable from root project 'Bar'
19
+ ------------------------------------------------------------
20
+
21
+ Android tasks
22
+ -------------
23
+ androidDependencies - Displays the Android dependencies of the project.
24
+ signingReport - Displays the signing info for the base and test modules
25
+ sourceSets - Prints out all the source sets defined in this project.
26
+
27
+ Build tasks
28
+ -----------
29
+ assemble - Assemble main outputs for all the variants.
30
+ assembleAndroidTest - Assembles all the Test applications.
31
+ assembleDebug - Assembles main outputs for all Debug variants.
32
+ assembleRelease - Assembles main outputs for all Release variants.
33
+ build - Assembles and tests this project.
34
+ buildDependents - Assembles and tests this project and all projects that depend on it.
35
+ buildNeeded - Assembles and tests this project and all projects it depends on.
36
+ bundle - Assemble bundles for all the variants.
37
+ bundleDebug - Assembles bundles for all Debug variants.
38
+ bundleRelease - Assembles bundles for all Release variants.
39
+
40
+
41
+ Install tasks
42
+ -------------
43
+ installDebug - Installs the Debug build.
44
+ installDebugAndroidTest - Installs the android (on device) tests for the Debug build.
45
+ installRelease - Installs the Release build.
46
+ uninstallAll - Uninstall all applications.
47
+ ` ;
48
+
14
49
jest . mock ( 'execa' ) ;
15
50
jest . mock ( '../getAdbPath' ) ;
16
51
jest . mock ( '../tryLaunchEmulator' ) ;
@@ -35,6 +70,7 @@ describe('--appFolder', () => {
35
70
} ;
36
71
beforeEach ( ( ) => {
37
72
jest . clearAllMocks ( ) ;
73
+ ( execa . sync as jest . Mock ) . mockReturnValueOnce ( { stdout : gradleTaskOutput } ) ;
38
74
} ) ;
39
75
40
76
it ( 'uses task "install[Variant]" as default task' , async ( ) => {
0 commit comments