@@ -1487,7 +1487,7 @@ final class LocalSwiftTests: XCTestCase {
1487
1487
swiftLanguageServer. reusedNodeCallback = { reusedNodes. append ( $0) }
1488
1488
sk. allowUnexpectedNotification = false
1489
1489
1490
- sk. send ( DidOpenTextDocumentNotification ( textDocument: TextDocumentItem (
1490
+ sk. sendNoteSync ( DidOpenTextDocumentNotification ( textDocument: TextDocumentItem (
1491
1491
uri: uri,
1492
1492
language: . swift,
1493
1493
version: 0 ,
@@ -1497,20 +1497,20 @@ final class LocalSwiftTests: XCTestCase {
1497
1497
class bar {
1498
1498
}
1499
1499
"""
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
+
1503
1506
sk. sendNoteSync ( DidChangeTextDocumentNotification ( textDocument: . init( uri, version: 1 ) , contentChanges: [
1504
1507
. init( range: Range ( Position ( line: 2 , utf16index: 7 ) ) , text: " a " ) ,
1505
1508
] ) , { ( note: LanguageServerProtocol . Notification < PublishDiagnosticsNotification > ) -> Void in
1506
1509
log ( " Received diagnostics for text edit - syntactic " )
1507
- didChangeTextDocumentExpectation. fulfill ( )
1508
1510
} , { ( note: LanguageServerProtocol . Notification < PublishDiagnosticsNotification > ) -> Void in
1509
1511
log ( " Received diagnostics for text edit - semantic " )
1510
1512
} )
1511
1513
1512
- self . wait ( for: [ didChangeTextDocumentExpectation] , timeout: defaultTimeout)
1513
-
1514
1514
XCTAssertEqual ( reusedNodes. count, 1 )
1515
1515
1516
1516
let firstNode = try XCTUnwrap ( reusedNodes. first)
0 commit comments