Skip to content

Commit 71dd877

Browse files
committed
Add descriptions and rename test struct name
1 parent e890263 commit 71dd877

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

Tests/ATProtoKitTests/ATProtoKitTests.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import Foundation
22
import Testing
33
@testable import ATProtoKit
44

5-
@Suite
6-
struct ATProtoKitTests {
5+
@Suite("ATFacetParser Tests")
6+
struct ATFacetParserTests {
77

88
struct ByteRange: Equatable {
99
let byteStart: Int
@@ -15,7 +15,7 @@ struct ATProtoKitTests {
1515
let uri: String
1616
}
1717

18-
@Test
18+
@Test("Session service endpoint builds authenticated wrapper request URL")
1919
func sessionServiceEndpointBuildsAuthenticatedWrapperRequestURL() throws {
2020
let pdsURL = "https://bsky.social"
2121
let serviceEndpoint = try #require(URL(string: "https://pds.host.bsky.network"))
@@ -51,7 +51,7 @@ struct ATProtoKitTests {
5151
#expect(matchingRequestURL.absoluteString == "https://pds.host.bsky.network/xrpc/com.atproto.server.getSession")
5252
}
5353

54-
@Test
54+
@Test("Query items percent encode plus signs")
5555
func setQueryItemsPercentEncodesPlusSigns() throws {
5656
let apiClientService = APIClientService(with: APIClientConfiguration())
5757
let requestURL = try #require(URL(string: "https://example.com/xrpc/app.bsky.feed.getFeed"))
@@ -76,7 +76,7 @@ struct ATProtoKitTests {
7676
#expect(urlWithMultipleItems.absoluteString.contains("+") == false)
7777
}
7878

79-
@Test
79+
@Test("Mentions are detected with Bluesky rich text rules")
8080
func detectsMentionsInline() {
8181
let testCases: [(input: String, mentions: [String])] = [
8282
("no mention", []),
@@ -99,7 +99,7 @@ struct ATProtoKitTests {
9999
}
100100
}
101101

102-
@Test
102+
@Test("Links are detected with Bluesky rich text rules")
103103
func detectsLinksInline() {
104104
let testCases: [(input: String, links: [LinkExpectation])] = [
105105
("start https://middle.com end", [.init(text: "https://middle.com", uri: "https://middle.com")]),
@@ -140,7 +140,7 @@ struct ATProtoKitTests {
140140
}
141141
}
142142

143-
@Test
143+
@Test("Hashtags are detected with Bluesky rich text rules")
144144
func detectsHashtagsInline() {
145145
let testCases: [(input: String, tags: [String], byteRanges: [ByteRange])] = [
146146
("#a", ["a"], [.init(byteStart: 0, byteEnd: 2)]),
@@ -191,7 +191,7 @@ struct ATProtoKitTests {
191191
}
192192
}
193193

194-
@Test
194+
@Test("Cashtags are detected with Bluesky rich text rules")
195195
func detectsCashtagsInline() async {
196196
let testCases: [(input: String, tags: [String], byteRanges: [AppBskyLexicon.RichText.Facet.ByteSlice])] = [
197197
("$AAPL", ["$AAPL"], [.init(byteStart: 0, byteEnd: 5)]),
@@ -252,7 +252,7 @@ struct ATProtoKitTests {
252252
}
253253

254254
#if canImport(Darwin)
255-
@Test
255+
@Test("AttributedString facet index converts UTF-8 byte slices")
256256
@available(iOS 15, tvOS 15, macOS 12, watchOS 8, *)
257257
func attributedStringFacetIndexConvertsUTF8ByteSlices() throws {
258258
let text = "👨‍👩‍👧‍👧 https://middle.com tail"
@@ -267,7 +267,7 @@ struct ATProtoKitTests {
267267
#expect(String(attributedString[range].characters) == "https://middle.com")
268268
}
269269

270-
@Test
270+
@Test("NSAttributedString facet range converts UTF-8 byte slices")
271271
func nsAttributedStringFacetRangeConvertsUTF8ByteSlices() throws {
272272
let text = "👨‍👩‍👧‍👧 https://middle.com tail"
273273
let attributedString = NSAttributedString(string: text)

0 commit comments

Comments
 (0)