@@ -50,7 +50,7 @@ describe('Neovis', () => {
50
50
}
51
51
} ;
52
52
const neovis = new Neovis ( config as NeovisConfig ) ;
53
- expect ( neovis . _config . labels . a ) . toMatchObject ( { label : 'name' , chosen : 'test' } ) ;
53
+ expect ( neovis . _config . labels ! . a ) . toMatchObject ( { label : 'name' , chosen : 'test' } ) ;
54
54
} ) ;
55
55
it ( 'should not change the config sent' , ( ) => {
56
56
config = {
@@ -87,7 +87,7 @@ describe('Neovis', () => {
87
87
}
88
88
} ;
89
89
const neovis = new Neovis ( config as NeovisConfig ) ;
90
- expect ( neovis . _config . relationships . a ) . toMatchObject ( {
90
+ expect ( neovis . _config . relationships ! . a ) . toMatchObject ( {
91
91
label : 'name' , color : 'test' , chosen : 'overridden'
92
92
} ) ;
93
93
} ) ;
@@ -101,7 +101,7 @@ describe('Neovis', () => {
101
101
}
102
102
} ;
103
103
const neovis = new Neovis ( config as NeovisConfig ) ;
104
- expect ( neovis . _config . labels . a ) . toMatchObject ( { label : 'name' , chosen : 'test' } ) ;
104
+ expect ( neovis . _config . labels ! . a ) . toMatchObject ( { label : 'name' , chosen : 'test' } ) ;
105
105
} ) ;
106
106
it ( 'should override default config if specific relationship have one' , ( ) => {
107
107
config . relationships = {
@@ -115,7 +115,7 @@ describe('Neovis', () => {
115
115
}
116
116
} ;
117
117
const neovis = new Neovis ( config as NeovisConfig ) ;
118
- expect ( neovis . _config . relationships . a ) . toMatchObject ( {
118
+ expect ( neovis . _config . relationships ! . a ) . toMatchObject ( {
119
119
label : 'name' , value : 'test' , chosen : 'overridden'
120
120
} ) ;
121
121
} ) ;
@@ -206,9 +206,9 @@ describe('Neovis', () => {
206
206
] ) ;
207
207
neovis . render ( ) ;
208
208
await testUtils . neovisRenderDonePromise ( neovis ) ;
209
- expect ( neovis . nodes . get ( 1 ) . raw ) . toBeDefined ( ) ;
210
- expect ( neovis . nodes . get ( 2 ) . raw ) . toBeDefined ( ) ;
211
- expect ( neovis . edges . get ( 3 ) . raw ) . toBeDefined ( ) ;
209
+ expect ( neovis . nodes . get ( 1 ) ! . raw ) . toBeDefined ( ) ;
210
+ expect ( neovis . nodes . get ( 2 ) ! . raw ) . toBeDefined ( ) ;
211
+ expect ( neovis . edges . get ( 3 ) ! . raw ) . toBeDefined ( ) ;
212
212
} ) ;
213
213
} ) ;
214
214
@@ -371,9 +371,9 @@ describe('Neovis', () => {
371
371
372
372
neovis . render ( ) ;
373
373
await testUtils . neovisRenderDonePromise ( neovis ) ;
374
- expect ( neovis . nodes . get ( 1 ) . font ) . toBeDefined ( ) ;
375
- expect ( ( neovis . nodes . get ( 1 ) . font as VisNetwork . Font ) . size ) . toBe ( fontSize ) ;
376
- expect ( ( neovis . nodes . get ( 1 ) . font as VisNetwork . Font ) . color ) . toBe ( fontColor ) ;
374
+ expect ( neovis . nodes . get ( 1 ) ! . font ) . toBeDefined ( ) ;
375
+ expect ( ( neovis . nodes . get ( 1 ) ! . font as VisNetwork . Font ) . size ) . toBe ( fontSize ) ;
376
+ expect ( ( neovis . nodes . get ( 1 ) ! . font as VisNetwork . Font ) . color ) . toBe ( fontColor ) ;
377
377
} ) ;
378
378
379
379
it ( 'font field for type not specified in config should not reflect in node data' , async ( ) => {
@@ -420,8 +420,8 @@ describe('Neovis', () => {
420
420
await testUtils . neovisRenderDonePromise ( neovis ) ;
421
421
expect ( Neo4jMock . mockSessionRun ) . toHaveBeenCalledTimes ( 1 ) ;
422
422
expect ( neovis . nodes . get ( 1 ) ) . toHaveProperty ( 'font' ) ;
423
- expect ( neovis . nodes . get ( 1 ) . font ) . toHaveProperty ( 'size' , intPropertyValue ) ;
424
- expect ( neovis . nodes . get ( 1 ) . font ) . toHaveProperty ( 'color' , intPropertyValue ) ;
423
+ expect ( neovis . nodes . get ( 1 ) ! . font ) . toHaveProperty ( 'size' , intPropertyValue ) ;
424
+ expect ( neovis . nodes . get ( 1 ) ! . font ) . toHaveProperty ( 'color' , intPropertyValue ) ;
425
425
} ) ;
426
426
427
427
it ( 'should merge static type to vis.js config properly' , async ( ) => {
0 commit comments