Last active
September 22, 2024 09:23
-
-
Save ptoffy/92bbdb61c84425400c4b8d802e6ad1e0 to your computer and use it in GitHub Desktop.
Swift Testing Migration Utilities
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replace: XCTAssertEqual\(([^,]+),\s*(.+?)\) | |
with: #expect($1 == $2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replace: XCTAssertNoThrow\((.*)\) | |
with: #expect(throws: Never.self) { $1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replace: XCTAssertThrowsError\((.*)\) | |
with: #expect(throws: (any Error).self) { $1 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replace: XCTFail | |
with: Issue.record |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
replace: XCTunwrap\((.*)\) | |
with: #require($1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment