@@ -12,7 +12,7 @@ import {
12
12
import { requestList } from './mock/env' ;
13
13
14
14
describe ( 'matchRemote' , ( ) => {
15
- it ( 'match default export with pkgName' , ( ) => {
15
+ it ( 'matches default export with pkgName' , ( ) => {
16
16
const matchInfo = matchRemoteWithNameAndExpose (
17
17
[
18
18
{
@@ -34,8 +34,7 @@ describe('matchRemote', () => {
34
34
version : '1.0.0' ,
35
35
} ) ;
36
36
} ) ;
37
-
38
- it ( 'match default export with alias' , ( ) => {
37
+ it ( 'matches default export with alias' , ( ) => {
39
38
const matchInfo = matchRemoteWithNameAndExpose (
40
39
[
41
40
{
@@ -59,8 +58,7 @@ describe('matchRemote', () => {
59
58
alias : 'hello' ,
60
59
} ) ;
61
60
} ) ;
62
-
63
- it ( 'match pkgName' , ( ) => {
61
+ it ( 'matches pkgName' , ( ) => {
64
62
const matchInfo = matchRemoteWithNameAndExpose (
65
63
[
66
64
{
@@ -82,8 +80,7 @@ describe('matchRemote', () => {
82
80
version : '1.0.0' ,
83
81
} ) ;
84
82
} ) ;
85
-
86
- it ( 'match alias' , ( ) => {
83
+ it ( 'matches alias' , ( ) => {
87
84
const matchInfo = matchRemoteWithNameAndExpose (
88
85
[
89
86
{
@@ -111,7 +108,7 @@ describe('matchRemote', () => {
111
108
112
109
// eslint-disable-next-line max-lines-per-function
113
110
describe ( 'loadRemote' , ( ) => {
114
- it ( 'api' , ( ) => {
111
+ it ( 'api functionality ' , ( ) => {
115
112
const FederationInstance = new FederationHost ( {
116
113
name : '@federation-test/loadRemote-api' ,
117
114
remotes : [ ] ,
@@ -221,8 +218,7 @@ describe('loadRemote', () => {
221
218
expect ( module2 ( ) ) . toBe ( 'hello app2' ) ;
222
219
reset ( ) ;
223
220
} ) ;
224
-
225
- it ( 'compatible with old structor' , async ( ) => {
221
+ it ( 'is compatible with old structure' , async ( ) => {
226
222
const reset = addGlobalSnapshot ( {
227
223
'@federation-test/compatible' : {
228
224
globalName : '' ,
@@ -271,8 +267,7 @@ describe('loadRemote', () => {
271
267
expect ( module ( ) ) . toBe ( 'hello app2' ) ;
272
268
reset ( ) ;
273
269
} ) ;
274
-
275
- it ( 'remote entry url with query' , async ( ) => {
270
+ it ( 'handles remote entry URL with query' , async ( ) => {
276
271
const FederationInstance = new FederationHost ( {
277
272
name : '@federation-test/compatible' ,
278
273
remotes : [
@@ -289,8 +284,7 @@ describe('loadRemote', () => {
289
284
assert ( module , 'module should be a function' ) ;
290
285
expect ( module ( ) ) . toBe ( 'hello app2' ) ;
291
286
} ) ;
292
-
293
- it ( 'different instance with same module' , async ( ) => {
287
+ it ( 'handles different instances with the same module' , async ( ) => {
294
288
const reset = addGlobalSnapshot ( {
295
289
'@module-federation/load-remote-different-instance' : {
296
290
buildVersion : 'custom' ,
@@ -360,7 +354,7 @@ describe('loadRemote', () => {
360
354
} ) ;
361
355
362
356
describe ( 'loadRemote with manifest.json' , ( ) => {
363
- it ( 'duplicate request manifest.json' , async ( ) => {
357
+ it ( 'handles duplicate request to manifest.json' , async ( ) => {
364
358
const FM = new FederationHost ( {
365
359
name : '@demo/host' ,
366
360
remotes : [
@@ -398,8 +392,7 @@ describe('loadRemote with manifest.json', () => {
398
392
) ,
399
393
) . toBe ( 1 ) ;
400
394
} ) ;
401
-
402
- it ( 'circulate deps' , async ( ) => {
395
+ it ( 'handles circular dependencies' , async ( ) => {
403
396
setGlobalFederationConstructor ( FederationHost , true ) ;
404
397
const FM = init ( {
405
398
name : '@circulate-deps/app1' ,
@@ -422,8 +415,7 @@ describe('loadRemote with manifest.json', () => {
422
415
Global . __FEDERATION__ . __INSTANCES__ = [ ] ;
423
416
setGlobalFederationConstructor ( undefined , true ) ;
424
417
} ) ;
425
-
426
- it ( 'manifest.json with query' , async ( ) => {
418
+ it ( 'handles manifest.json with query' , async ( ) => {
427
419
const FM = new FederationHost ( {
428
420
name : '@demo/host' ,
429
421
remotes : [
@@ -442,9 +434,8 @@ describe('loadRemote with manifest.json', () => {
442
434
expect ( module ( ) ) . toBe ( 'hello world' ) ;
443
435
} ) ;
444
436
} ) ;
445
-
446
- describe ( 'lazy loadRemote add remote into snapshot' , ( ) => {
447
- it ( 'load remoteEntry' , async ( ) => {
437
+ describe ( 'lazy loadRemote and add remote into snapshot' , ( ) => {
438
+ it ( 'loads remoteEntry' , async ( ) => {
448
439
const reset = addGlobalSnapshot ( {
449
440
'@demo/app2' : {
450
441
buildVersion : '1.0.2' ,
@@ -498,8 +489,7 @@ describe('lazy loadRemote add remote into snapshot', () => {
498
489
expect ( afterRemotesLength ) . toBe ( 1 ) ;
499
490
reset ( ) ;
500
491
} ) ;
501
-
502
- it ( 'load manifest' , async ( ) => {
492
+ it ( 'loads manifest' , async ( ) => {
503
493
const reset = addGlobalSnapshot ( {
504
494
'@demo/app1' : {
505
495
globalName : `__FEDERATION_${ '@load-remote/app1:custom' } __` ,
@@ -545,7 +535,7 @@ describe('lazy loadRemote add remote into snapshot', () => {
545
535
} ) ;
546
536
547
537
describe ( 'loadRemote' , ( ) => {
548
- it ( 'api ' , async ( ) => {
538
+ it ( 'loads remote synchronously ' , async ( ) => {
549
539
const jsSyncAssetPath = 'resources/load-remote/app2/say.sync.js' ;
550
540
const remotePublicPath = 'http://localhost:1111/' ;
551
541
const reset = addGlobalSnapshot ( {
0 commit comments