File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -383,7 +383,22 @@ final class CodeActionTests: XCTestCase {
383
383
command: expectedCommand
384
384
)
385
385
386
- XCTAssertEqual ( result, . codeActions( [ expectedCodeAction] ) )
386
+ guard case . codeActions( var resultActions) = result else {
387
+ XCTFail ( " Result doesn't have code actions: \( String ( describing: result) ) " )
388
+ return
389
+ }
390
+
391
+ // Filter out "Add documentation"; we test it elsewhere
392
+ if let addDocIndex = resultActions. firstIndex ( where: {
393
+ $0. title == " Add documentation " }
394
+ ) {
395
+ resultActions. remove ( at: addDocIndex)
396
+ } else {
397
+ XCTFail ( " Missing 'Add documentation'. " )
398
+ return
399
+ }
400
+
401
+ XCTAssertEqual ( resultActions, [ expectedCodeAction] )
387
402
}
388
403
389
404
func testCodeActionsRemovePlaceholders( ) async throws {
You can’t perform that action at this time.
0 commit comments