File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -174,11 +174,8 @@ describe('Core: load process', () => {
174
174
} ) ;
175
175
176
176
it ( 'config provided by options in loadApp will have the highest priority after config merged' , async ( ) => {
177
- const mockBeforeLoad = jest . fn ( ( ) => {
178
- GarfishInstance . appInfos [ 'vue-app' ] = {
179
- name : 'vue-app' ,
180
- entry : vue3SubAppEntry ,
181
- } ;
177
+ const mockBeforeLoad = jest . fn ( ( appInfo ) => {
178
+ appInfo . entry = vue3SubAppEntry ;
182
179
} ) ;
183
180
184
181
GarfishInstance . run ( {
@@ -195,10 +192,16 @@ describe('Core: load process', () => {
195
192
await expect (
196
193
GarfishInstance . loadApp ( 'vue-app' , {
197
194
domGetter : '#container' ,
195
+ props : {
196
+ aaa : '123'
197
+ }
198
198
} ) ,
199
199
) . resolves . toMatchObject ( {
200
200
appInfo : {
201
201
entry : vue3SubAppEntry ,
202
+ props : {
203
+ aaa : '123'
204
+ }
202
205
} ,
203
206
} ) ;
204
207
Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ export class Garfish extends EventEmitter2 {
173
173
}
174
174
175
175
//merge configs again after beforeLoad for the reason of app may be re-registered during beforeLoad resulting in an incorrect information
176
- appInfo = generateAppOptions ( appName , this , options ) ;
176
+ appInfo = generateAppOptions ( appName , this , appInfo ) ;
177
177
178
178
assert (
179
179
appInfo . entry ,
You can’t perform that action at this time.
0 commit comments