@@ -19,6 +19,7 @@ const prepareData = {
19
19
let isCompileWithWatchCalled = false ;
20
20
let isCompileWithoutWatchCalled = false ;
21
21
let isNativePrepareCalled = false ;
22
+ let isEnsuringAppResourcesExist = false ;
22
23
let emittedEventNames : string [ ] = [ ] ;
23
24
let emittedEventData : any [ ] = [ ] ;
24
25
@@ -64,6 +65,12 @@ function createTestInjector(data: { hasNativeChanges: boolean }): IInjector {
64
65
} ) ;
65
66
66
67
injector . register ( "tempService" , TempServiceStub ) ;
68
+ injector . register ( "projectService" , {
69
+ ensureAppResourcesExist ( projectDir : string ) : Promise < void > {
70
+ isEnsuringAppResourcesExist = true ;
71
+ return ;
72
+ } ,
73
+ } ) ;
67
74
68
75
const prepareController : PrepareController = injector . resolve (
69
76
"prepareController"
@@ -84,6 +91,7 @@ describe("prepareController", () => {
84
91
isNativePrepareCalled = false ;
85
92
isCompileWithWatchCalled = false ;
86
93
isCompileWithoutWatchCalled = false ;
94
+ isEnsuringAppResourcesExist = false ;
87
95
88
96
emittedEventNames = [ ] ;
89
97
emittedEventData = [ ] ;
@@ -102,6 +110,7 @@ describe("prepareController", () => {
102
110
103
111
assert . isTrue ( isCompileWithWatchCalled ) ;
104
112
assert . isTrue ( isNativePrepareCalled ) ;
113
+ assert . isTrue ( isEnsuringAppResourcesExist ) ;
105
114
} ) ;
106
115
} ) ;
107
116
it ( `should respect native changes that are made before the initial preparation of the project had been done for ${ platform } ` , async ( ) => {
@@ -161,6 +170,7 @@ describe("prepareController", () => {
161
170
assert . isTrue ( isNativePrepareCalled ) ;
162
171
assert . isTrue ( isCompileWithoutWatchCalled ) ;
163
172
assert . isFalse ( isCompileWithWatchCalled ) ;
173
+ assert . isTrue ( isEnsuringAppResourcesExist ) ;
164
174
} ) ;
165
175
} ) ;
166
176
} ) ;
0 commit comments