@@ -53,7 +53,7 @@ const fakeConfig: {
53
53
describe ( 'ListWatchCache' , ( ) => {
54
54
it ( 'should throw on unknown update' , ( ) => {
55
55
const fake = mock . mock ( Watch ) ;
56
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
56
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
57
57
response : http . IncomingMessage ;
58
58
body : V1NamespaceList ;
59
59
} > {
@@ -116,7 +116,7 @@ describe('ListWatchCache', () => {
116
116
} as V1PodList ;
117
117
118
118
let calls = 0 ;
119
- const listFn : ListPromise < V1Pod > = function ( ) : Promise < {
119
+ const listFn : ListPromise < V1Pod > = function ( ) : Promise < {
120
120
response : http . IncomingMessage ;
121
121
body : V1PodList ;
122
122
} > {
@@ -238,7 +238,7 @@ describe('ListWatchCache', () => {
238
238
} as V1NamespaceList ;
239
239
240
240
let calls = 0 ;
241
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
241
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
242
242
response : http . IncomingMessage ;
243
243
body : V1NamespaceList ;
244
244
} > {
@@ -339,7 +339,7 @@ describe('ListWatchCache', () => {
339
339
items : list ,
340
340
} as V1NamespaceList ;
341
341
342
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
342
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
343
343
response : http . IncomingMessage ;
344
344
body : V1NamespaceList ;
345
345
} > {
@@ -399,15 +399,11 @@ describe('ListWatchCache', () => {
399
399
} as V1Namespace ) ;
400
400
401
401
return Promise . all ( [
402
- expect ( addPromise )
403
- . to . eventually . have . property ( 'metadata' )
404
- . that . deep . equals ( { name : 'name3' } ) ,
402
+ expect ( addPromise ) . to . eventually . have . property ( 'metadata' ) . that . deep . equals ( { name : 'name3' } ) ,
405
403
expect ( updatePromise )
406
404
. to . eventually . have . property ( 'metadata' )
407
405
. that . deep . equals ( { name : 'name3' , resourceVersion : 'baz' } ) ,
408
- expect ( deletePromise )
409
- . to . eventually . have . property ( 'metadata' )
410
- . that . deep . equals ( { name : 'name2' } ) ,
406
+ expect ( deletePromise ) . to . eventually . have . property ( 'metadata' ) . that . deep . equals ( { name : 'name2' } ) ,
411
407
] ) ;
412
408
} ) ;
413
409
@@ -432,7 +428,7 @@ describe('ListWatchCache', () => {
432
428
items : list ,
433
429
} as V1NamespaceList ;
434
430
435
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
431
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
436
432
response : http . IncomingMessage ;
437
433
body : V1NamespaceList ;
438
434
} > {
@@ -495,7 +491,7 @@ describe('ListWatchCache', () => {
495
491
items : [ ] ,
496
492
} as V1NamespaceList ;
497
493
498
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
494
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
499
495
response : http . IncomingMessage ;
500
496
body : V1NamespaceList ;
501
497
} > {
@@ -536,12 +532,8 @@ describe('ListWatchCache', () => {
536
532
} as V1Namespace ) ;
537
533
538
534
return Promise . all ( [
539
- expect ( addPromise )
540
- . to . eventually . have . property ( 'metadata' )
541
- . that . deep . equals ( { name : 'name3' } ) ,
542
- expect ( addPromise2 )
543
- . to . eventually . have . property ( 'metadata' )
544
- . that . deep . equals ( { name : 'name3' } ) ,
535
+ expect ( addPromise ) . to . eventually . have . property ( 'metadata' ) . that . deep . equals ( { name : 'name3' } ) ,
536
+ expect ( addPromise2 ) . to . eventually . have . property ( 'metadata' ) . that . deep . equals ( { name : 'name3' } ) ,
545
537
] ) ;
546
538
} ) ;
547
539
@@ -568,7 +560,7 @@ describe('ListWatchCache', () => {
568
560
items : list ,
569
561
} as V1NamespaceList ;
570
562
571
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
563
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
572
564
response : http . IncomingMessage ;
573
565
body : V1NamespaceList ;
574
566
} > {
@@ -644,7 +636,7 @@ describe('ListWatchCache', () => {
644
636
items : list ,
645
637
} as V1NamespaceList ;
646
638
647
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
639
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
648
640
response : http . IncomingMessage ;
649
641
body : V1NamespaceList ;
650
642
} > {
@@ -724,7 +716,7 @@ describe('ListWatchCache', () => {
724
716
items : list ,
725
717
} as V1NamespaceList ;
726
718
727
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
719
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
728
720
response : http . IncomingMessage ;
729
721
body : V1NamespaceList ;
730
722
} > {
@@ -854,7 +846,7 @@ describe('ListWatchCache', () => {
854
846
} as V1ListMeta ,
855
847
items : list ,
856
848
} as V1NamespaceList ;
857
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
849
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
858
850
response : http . IncomingMessage ;
859
851
body : V1NamespaceList ;
860
852
} > {
@@ -870,11 +862,11 @@ describe('ListWatchCache', () => {
870
862
const informer = new ListWatch ( '/some/path' , mock . instance ( fakeWatch ) , listFn ) ;
871
863
872
864
const addedList1 : V1Namespace [ ] = [ ] ;
873
- const addToList1Fn = function ( obj ?: V1Namespace ) {
865
+ const addToList1Fn = function ( obj ?: V1Namespace ) {
874
866
addedList1 . push ( obj ! ) ;
875
867
} ;
876
868
const addedList2 : V1Namespace [ ] = [ ] ;
877
- const addToList2Fn = function ( obj ?: V1Namespace ) {
869
+ const addToList2Fn = function ( obj ?: V1Namespace ) {
878
870
addedList2 . push ( obj ! ) ;
879
871
} ;
880
872
@@ -913,7 +905,7 @@ describe('ListWatchCache', () => {
913
905
} as V1ListMeta ,
914
906
items : list ,
915
907
} as V1NamespaceList ;
916
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
908
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
917
909
response : http . IncomingMessage ;
918
910
body : V1NamespaceList ;
919
911
} > {
@@ -929,10 +921,10 @@ describe('ListWatchCache', () => {
929
921
const informer = new ListWatch ( '/some/path' , mock . instance ( fakeWatch ) , listFn ) ;
930
922
931
923
const addedList : V1Namespace [ ] = [ ] ;
932
- const addToListFn = function ( obj ?: V1Namespace ) {
924
+ const addToListFn = function ( obj ?: V1Namespace ) {
933
925
addedList . push ( obj ! ) ;
934
926
} ;
935
- const removeSelf = function ( ) {
927
+ const removeSelf = function ( ) {
936
928
informer . off ( 'add' , removeSelf ) ;
937
929
} ;
938
930
@@ -974,7 +966,7 @@ describe('ListWatchCache', () => {
974
966
items : list ,
975
967
} as V1NamespaceList ;
976
968
977
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
969
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
978
970
response : http . IncomingMessage ;
979
971
body : V1NamespaceList ;
980
972
} > {
@@ -1001,7 +993,7 @@ describe('ListWatchCache', () => {
1001
993
} as V1ListMeta ,
1002
994
items : list ,
1003
995
} as V1NamespaceList ;
1004
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
996
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1005
997
response : http . IncomingMessage ;
1006
998
body : V1NamespaceList ;
1007
999
} > {
@@ -1017,11 +1009,11 @@ describe('ListWatchCache', () => {
1017
1009
const informer = new ListWatch ( '/some/path' , mock . instance ( fakeWatch ) , listFn ) ;
1018
1010
1019
1011
const addedList1 : V1Namespace [ ] = [ ] ;
1020
- const addToList1Fn = function ( obj ?: V1Namespace ) {
1012
+ const addToList1Fn = function ( obj ?: V1Namespace ) {
1021
1013
addedList1 . push ( obj ! ) ;
1022
1014
} ;
1023
1015
const addedList2 : V1Namespace [ ] = [ ] ;
1024
- const addToList2Fn = function ( obj ?: V1Namespace ) {
1016
+ const addToList2Fn = function ( obj ?: V1Namespace ) {
1025
1017
addedList2 . push ( obj ! ) ;
1026
1018
} ;
1027
1019
@@ -1079,7 +1071,7 @@ describe('ListWatchCache', () => {
1079
1071
items : list ,
1080
1072
} as V1NamespaceList ;
1081
1073
1082
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1074
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1083
1075
response : http . IncomingMessage ;
1084
1076
body : V1NamespaceList ;
1085
1077
} > {
@@ -1142,7 +1134,7 @@ describe('ListWatchCache', () => {
1142
1134
items : list ,
1143
1135
} as V1NamespaceList ;
1144
1136
1145
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1137
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1146
1138
response : http . IncomingMessage ;
1147
1139
body : V1NamespaceList ;
1148
1140
} > {
@@ -1188,7 +1180,7 @@ describe('ListWatchCache', () => {
1188
1180
items : list ,
1189
1181
} as V1NamespaceList ;
1190
1182
1191
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1183
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1192
1184
response : http . IncomingMessage ;
1193
1185
body : V1NamespaceList ;
1194
1186
} > {
@@ -1245,7 +1237,7 @@ describe('ListWatchCache', () => {
1245
1237
} as V1NamespaceList ;
1246
1238
1247
1239
let listCalls = 0 ;
1248
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1240
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1249
1241
response : http . IncomingMessage ;
1250
1242
body : V1NamespaceList ;
1251
1243
} > {
@@ -1326,7 +1318,7 @@ describe('ListWatchCache', () => {
1326
1318
} as V1NamespaceList ;
1327
1319
1328
1320
let listCalls = 0 ;
1329
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1321
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1330
1322
response : http . IncomingMessage ;
1331
1323
body : V1NamespaceList ;
1332
1324
} > {
@@ -1417,7 +1409,7 @@ describe('ListWatchCache', () => {
1417
1409
items : list ,
1418
1410
} as V1NamespaceList ;
1419
1411
1420
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1412
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1421
1413
response : http . IncomingMessage ;
1422
1414
body : V1NamespaceList ;
1423
1415
} > {
@@ -1456,7 +1448,7 @@ describe('ListWatchCache', () => {
1456
1448
items : list ,
1457
1449
} as V1NamespaceList ;
1458
1450
1459
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1451
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1460
1452
response : http . IncomingMessage ;
1461
1453
body : V1NamespaceList ;
1462
1454
} > {
@@ -1547,7 +1539,7 @@ describe('delete items', () => {
1547
1539
items : [ ] ,
1548
1540
} as V1NamespaceList ;
1549
1541
1550
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1542
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1551
1543
response : http . IncomingMessage ;
1552
1544
body : V1NamespaceList ;
1553
1545
} > {
@@ -1591,7 +1583,7 @@ describe('delete items', () => {
1591
1583
items : list ,
1592
1584
} as V1NamespaceList ;
1593
1585
1594
- const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1586
+ const listFn : ListPromise < V1Namespace > = function ( ) : Promise < {
1595
1587
response : http . IncomingMessage ;
1596
1588
body : V1NamespaceList ;
1597
1589
} > {
0 commit comments