File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -66,15 +66,16 @@ async function run(server: TSServer) {
6666
6767 return server . close ( ) . then ( ( ) => {
6868 const semanticDiagEvent = findResponse ( server . responses , 'semanticDiag' ) ;
69- const fileEvent = semanticDiagEvent . filter ( ( it ) => toFileSystemSlash ( it . body . file ) === file ) [ 0 ] ;
70- const otherFileEvent = semanticDiagEvent . filter (
69+ const fileEvent = semanticDiagEvent . find ( ( it ) => toFileSystemSlash ( it . body . file ) === file ) ;
70+ const otherFileEvent = semanticDiagEvent . find (
7171 ( it ) => toFileSystemSlash ( it . body . file ) === otherFile ,
72- ) [ 0 ] ;
72+ ) ;
7373
7474 assert ( ! ! fileEvent ) ;
7575 assert ( ! ! otherFileEvent ) ;
76- assert . strictEqual ( fileEvent . body . diagnostics . length , 1 ) ;
77- assert . strictEqual ( otherFileEvent . body . diagnostics . length , 0 ) ;
76+
77+ assert . strictEqual ( fileEvent ! . body . diagnostics . length , 1 ) ;
78+ assert . strictEqual ( otherFileEvent ! . body . diagnostics . length , 0 ) ;
7879 } ) ;
7980}
8081
You can’t perform that action at this time.
0 commit comments