@@ -14,6 +14,56 @@ const BUILD_TARGET: BuildTarget = {
14
14
name : `${ PROJECT } :build:production`
15
15
} ;
16
16
17
+
18
+ const initMocks = ( ) => {
19
+ fsHost = {
20
+ moveSync ( _ : string , __ : string ) {
21
+ } ,
22
+ renameSync ( _ : string , __ : string ) {
23
+ } ,
24
+ writeFileSync ( _ : string , __ : string ) {
25
+ }
26
+ } ;
27
+
28
+ firebaseMock = {
29
+ login : ( ) => Promise . resolve ( ) ,
30
+ projects : {
31
+ list : ( ) => Promise . resolve ( [ ] ) ,
32
+ } ,
33
+ deploy : ( _ : FirebaseDeployConfig ) => Promise . resolve ( ) ,
34
+ use : ( ) => Promise . resolve ( ) ,
35
+ logger : {
36
+ add : ( ) => { }
37
+ } ,
38
+ serve : ( ) => Promise . resolve ( )
39
+ } ;
40
+
41
+ context = ( {
42
+ target : {
43
+ configuration : 'production' ,
44
+ project : PROJECT ,
45
+ target : 'foo'
46
+ } ,
47
+ builder : {
48
+ builderName : 'mock' ,
49
+ description : 'mock' ,
50
+ optionSchema : false
51
+ } ,
52
+ currentDirectory : 'cwd' ,
53
+ id : 1 ,
54
+ logger : new logging . NullLogger ( ) as any ,
55
+ workspaceRoot : 'cwd' ,
56
+ getTargetOptions : ( _ : Target ) => Promise . resolve ( { } ) ,
57
+ reportProgress : ( _ : number , __ ?: number , ___ ?: string ) => {
58
+ } ,
59
+ reportStatus : ( _ : string ) => { } ,
60
+ reportRunning : ( ) => { } ,
61
+ scheduleBuilder : ( _ : string , __ ?: JsonObject , ___ ?: ScheduleOptions ) => Promise . resolve ( { } as BuilderRun ) ,
62
+ scheduleTarget : ( _ : Target , __ ?: JsonObject , ___ ?: ScheduleOptions ) => Promise . resolve ( { } as BuilderRun )
63
+ } as any ) ;
64
+ } ;
65
+
66
+
17
67
const projectTargets : experimental . workspace . WorkspaceTool = {
18
68
build : {
19
69
options : {
@@ -133,51 +183,3 @@ describe('universal deployment', () => {
133
183
expect(spy).not.toHaveBeenCalled();
134
184
});*/
135
185
} ) ;
136
-
137
- const initMocks = ( ) => {
138
- fsHost = {
139
- moveSync ( _ : string , __ : string ) {
140
- } ,
141
- renameSync ( _ : string , __ : string ) {
142
- } ,
143
- writeFileSync ( _ : string , __ : string ) {
144
- }
145
- } ;
146
-
147
- firebaseMock = {
148
- login : ( ) => Promise . resolve ( ) ,
149
- projects : {
150
- list : ( ) => Promise . resolve ( [ ] ) ,
151
- } ,
152
- deploy : ( _ : FirebaseDeployConfig ) => Promise . resolve ( ) ,
153
- use : ( ) => Promise . resolve ( ) ,
154
- logger : {
155
- add : ( ) => { }
156
- } ,
157
- serve : ( ) => Promise . resolve ( )
158
- } ;
159
-
160
- context = ( {
161
- target : {
162
- configuration : 'production' ,
163
- project : PROJECT ,
164
- target : 'foo'
165
- } ,
166
- builder : {
167
- builderName : 'mock' ,
168
- description : 'mock' ,
169
- optionSchema : false
170
- } ,
171
- currentDirectory : 'cwd' ,
172
- id : 1 ,
173
- logger : new logging . NullLogger ( ) as any ,
174
- workspaceRoot : 'cwd' ,
175
- getTargetOptions : ( _ : Target ) => Promise . resolve ( { } ) ,
176
- reportProgress : ( _ : number , __ ?: number , ___ ?: string ) => {
177
- } ,
178
- reportStatus : ( _ : string ) => { } ,
179
- reportRunning : ( ) => { } ,
180
- scheduleBuilder : ( _ : string , __ ?: JsonObject , ___ ?: ScheduleOptions ) => Promise . resolve ( { } as BuilderRun ) ,
181
- scheduleTarget : ( _ : Target , __ ?: JsonObject , ___ ?: ScheduleOptions ) => Promise . resolve ( { } as BuilderRun )
182
- } as any ) ;
183
- } ;
0 commit comments