Skip to content

Commit 60462c2

Browse files
committed
Link Swift Testing documentation in its test template
This hopefully makes it easier for new users to find relevant documentation for our test framework! It also matches the existing pattern where XCTest documentation is linked in its respective test template.
1 parent 9057cae commit 60462c2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sources/Workspace/InitPackage.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ public final class InitPackage {
549549
func createBuildCommand(for inputPath: URL, in outputDirectoryPath: URL, with generatorToolPath: URL) -> Command? {
550550
// Skip any file that doesn't have the extension we're looking for (replace this with the actual one).
551551
guard inputPath.pathExtension == "my-input-suffix" else { return .none }
552-
552+
553553
// Return a command that will run during the build to generate the output file.
554554
let inputName = inputPath.lastPathComponent
555555
let outputName = inputPath.deletingPathExtension().lastPathComponent + ".swift"
@@ -644,7 +644,7 @@ public final class InitPackage {
644644
content = """
645645
// The Swift Programming Language
646646
// https://docs.swift.org/swift-book
647-
//
647+
//
648648
// Swift Argument Parser
649649
// https://swiftpackageindex.com/apple/swift-argument-parser/documentation
650650
@@ -731,6 +731,8 @@ public final class InitPackage {
731731
732732
@Test func example() async throws {
733733
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
734+
// Swift Testing Documentation
735+
// https://swiftpackageindex.com/swiftlang/swift-testing/documentation
734736
}
735737
736738
"""

0 commit comments

Comments
 (0)