@@ -62,61 +62,61 @@ final class IssueResolverTests: XCTestCase {
6262 " Resolves " ,
6363 " resolved "
6464 ]
65-
65+
6666 let issueNumber = 4343
6767
6868 issueClosingKeywords. forEach { ( closingKeyword) in
6969 let description = examplePullRequestDescriptionUsing ( closingKeyword: closingKeyword, issueNumber: issueNumber)
7070 XCTAssertEqual ( description. resolvingIssues ( ) , [ issueNumber] )
7171 }
7272 }
73-
73+
7474 /// It should not extract anything if no issue number is found.
7575 func testResolvingNoReferencedIssue( ) {
7676 let description = examplePullRequestDescriptionUsing ( closingKeyword: " fixes " , issueNumber: nil )
7777 XCTAssertTrue ( description. resolvingIssues ( ) . isEmpty)
7878 }
79-
79+
8080 /// It should not extract anything if no closing keyword is found.
8181 func testResolvingNoClosingKeyword( ) {
8282 let issueNumber = 4343
8383
8484 let description = examplePullRequestDescriptionUsing ( closingKeyword: " " , issueNumber: issueNumber)
8585 XCTAssertTrue ( description. resolvingIssues ( ) . isEmpty)
8686 }
87-
87+
8888 /// It should extract mulitple issues.
8989 func testResolvingMultipleIssues( ) {
9090 let description = " This is a beautiful PR that close #123 for real. It also fixes #1 and fixes #2 "
9191 let resolvedIssues = description. resolvingIssues ( )
9292 XCTAssertEqual ( resolvedIssues. count, 3 )
9393 XCTAssertEqual ( Set ( description. resolvingIssues ( ) ) , Set ( [ 123 , 1 , 2 ] ) )
9494 }
95-
95+
9696 /// It should deduplicate if the same issue is closed multiple times.
9797 func testResolvingMultipleIssuesDedup( ) {
9898 let description = " This is a beautiful PR that close #123 for real. It also fixes #123 "
9999 XCTAssertEqual ( description. resolvingIssues ( ) , [ 123 ] )
100100 }
101-
101+
102102 /// It should not extract anything if there is no number after the #.
103103 func testResolvingNoNumber( ) {
104104 let description = " This is a beautiful PR that close # for real. "
105105 XCTAssertTrue ( description. resolvingIssues ( ) . isEmpty)
106106 }
107-
107+
108108 /// It should not extract anything if there is no number after the #, and it's at the end.
109109 func testResolvingNoNumberLast( ) {
110110 let description = " This is a beautiful PR that close # "
111111 XCTAssertTrue ( description. resolvingIssues ( ) . isEmpty)
112112 }
113-
113+
114114 /// It should extract the issue if it's first.
115115 func testResolvingIssueFirst( ) {
116116 let description = " Resolves #123. Yay! "
117117 XCTAssertEqual ( description. resolvingIssues ( ) , [ 123 ] )
118118 }
119-
119+
120120 /// It should extract the issue if it's the only thing present.
121121 func testResolvingIssueOnly( ) {
122122 let description = " Resolved #123 "
@@ -127,7 +127,7 @@ final class IssueResolverTests: XCTestCase {
127127extension IssueResolverTests {
128128 func examplePullRequestDescriptionUsing( closingKeyword: String , issueNumber: Int ? ) -> String {
129129 let issueNumberString = issueNumber? . description ?? " "
130-
130+
131131 return """
132132 This PR does a lot of awesome stuff.
133133 It even closes some issues!
0 commit comments