@@ -1487,7 +1487,7 @@ final class LocalSwiftTests: XCTestCase {
14871487 swiftLanguageServer. reusedNodeCallback = { reusedNodes. append ( $0) }
14881488 sk. allowUnexpectedNotification = false
14891489
1490- sk. send ( DidOpenTextDocumentNotification ( textDocument: TextDocumentItem (
1490+ sk. sendNoteSync ( DidOpenTextDocumentNotification ( textDocument: TextDocumentItem (
14911491 uri: uri,
14921492 language: . swift,
14931493 version: 0 ,
@@ -1497,20 +1497,20 @@ final class LocalSwiftTests: XCTestCase {
14971497 class bar {
14981498 }
14991499 """
1500- ) ) )
1501-
1502- let didChangeTextDocumentExpectation = self . expectation ( description: " didChangeTextDocument " )
1500+ ) ) , { ( note: LanguageServerProtocol . Notification < PublishDiagnosticsNotification > ) -> Void in
1501+ log ( " Received diagnostics for open - syntactic " )
1502+ } , { ( note: LanguageServerProtocol . Notification < PublishDiagnosticsNotification > ) -> Void in
1503+ log ( " Received diagnostics for open - semantic " )
1504+ } )
1505+
15031506 sk. sendNoteSync ( DidChangeTextDocumentNotification ( textDocument: . init( uri, version: 1 ) , contentChanges: [
15041507 . init( range: Range ( Position ( line: 2 , utf16index: 7 ) ) , text: " a " ) ,
15051508 ] ) , { ( note: LanguageServerProtocol . Notification < PublishDiagnosticsNotification > ) -> Void in
15061509 log ( " Received diagnostics for text edit - syntactic " )
1507- didChangeTextDocumentExpectation. fulfill ( )
15081510 } , { ( note: LanguageServerProtocol . Notification < PublishDiagnosticsNotification > ) -> Void in
15091511 log ( " Received diagnostics for text edit - semantic " )
15101512 } )
15111513
1512- self . wait ( for: [ didChangeTextDocumentExpectation] , timeout: defaultTimeout)
1513-
15141514 XCTAssertEqual ( reusedNodes. count, 1 )
15151515
15161516 let firstNode = try XCTUnwrap ( reusedNodes. first)
0 commit comments