@@ -307,7 +307,7 @@ suite('AsyncDataTree', function () {
307
307
assert ( ! aNode . collapsed ) ;
308
308
assert . equal ( aNode . children . length , 1 ) ;
309
309
assert . equal ( aNode . children [ 0 ] . element . id , 'b' ) ;
310
- const bChild = container . querySelector ( '.monaco-list-row:nth-child(2)' ) as HTMLElement | undefined ;
310
+ const bChild = container . querySelector ( '.monaco-list-row:nth-child(2)' ) ;
311
311
assert . equal ( bChild ?. textContent , 'b' ) ;
312
312
tree . collapse ( a ) ;
313
313
assert ( aNode . collapsed ) ;
@@ -319,8 +319,8 @@ suite('AsyncDataTree', function () {
319
319
assert . equal ( aNodeUpdated1 . children . length , 0 ) ;
320
320
let didCheckNoChildren = false ;
321
321
const event = tree . onDidChangeCollapseState ( e => {
322
- const child = container . querySelector ( '.monaco-list-row:nth-child(2)' ) as HTMLElement | undefined ;
323
- assert . equal ( child , undefined ) ;
322
+ const child = container . querySelector ( '.monaco-list-row:nth-child(2)' ) ;
323
+ assert . equal ( child , null ) ;
324
324
didCheckNoChildren = true ;
325
325
} ) ;
326
326
await tree . expand ( aUpdated1 ) ;
@@ -331,7 +331,7 @@ suite('AsyncDataTree', function () {
331
331
assert ( ! aNodeUpdated2 . collapsed ) ;
332
332
assert . equal ( aNodeUpdated2 . children . length , 1 ) ;
333
333
assert . equal ( aNodeUpdated2 . children [ 0 ] . element . id , 'c' ) ;
334
- const child = container . querySelector ( '.monaco-list-row:nth-child(2)' ) as HTMLElement | undefined ;
334
+ const child = container . querySelector ( '.monaco-list-row:nth-child(2)' ) ;
335
335
assert . equal ( child ?. textContent , 'c' ) ;
336
336
} ) ;
337
337
@@ -364,7 +364,7 @@ suite('AsyncDataTree', function () {
364
364
assert ( ! aNode . collapsed ) ;
365
365
assert . equal ( aNode . children . length , 1 ) ;
366
366
assert . equal ( aNode . children [ 0 ] . element . id , 'b' ) ;
367
- const bChild = container . querySelector ( '.monaco-list-row:nth-child(2)' ) as HTMLElement | undefined ;
367
+ const bChild = container . querySelector ( '.monaco-list-row:nth-child(2)' ) ;
368
368
assert . equal ( bChild ?. textContent , 'b' ) ;
369
369
tree . collapse ( a ) ;
370
370
assert ( aNode . collapsed ) ;
@@ -375,7 +375,7 @@ suite('AsyncDataTree', function () {
375
375
assert . equal ( aNodeUpdated1 . children . length , 1 ) ;
376
376
let didCheckSameChildren = false ;
377
377
const event = tree . onDidChangeCollapseState ( e => {
378
- const child = container . querySelector ( '.monaco-list-row:nth-child(2)' ) as HTMLElement | undefined ;
378
+ const child = container . querySelector ( '.monaco-list-row:nth-child(2)' ) ;
379
379
assert . equal ( child ?. textContent , 'b' ) ;
380
380
didCheckSameChildren = true ;
381
381
} ) ;
@@ -387,7 +387,7 @@ suite('AsyncDataTree', function () {
387
387
assert ( ! aNodeUpdated2 . collapsed ) ;
388
388
assert . equal ( aNodeUpdated2 . children . length , 1 ) ;
389
389
assert . equal ( aNodeUpdated2 . children [ 0 ] . element . id , 'b' ) ;
390
- const child = container . querySelector ( '.monaco-list-row:nth-child(2)' ) as HTMLElement | undefined ;
390
+ const child = container . querySelector ( '.monaco-list-row:nth-child(2)' ) ;
391
391
assert . equal ( child ?. textContent , 'b' ) ;
392
392
} ) ;
393
393
0 commit comments