@@ -163,13 +163,18 @@ class DocumentationCuratorTests: XCTestCase {
163163 """ . write ( to: url. appendingPathComponent ( " Root.md " ) , atomically: true , encoding: . utf8)
164164 }
165165
166- var crawler = DocumentationCurator . init ( in: context, bundle: bundle)
166+ let crawler = DocumentationCurator . init ( in: context, bundle: bundle)
167167 XCTAssert ( context. problems. isEmpty, " Expected no problems. Found: \( context. problems. map ( \. diagnostic. summary) ) " )
168168
169- for node in context. rootModules {
170- XCTAssertNoThrow ( try crawler. crawlChildren ( of: node, prepareForCuration: { _ in } , relateNodes: { _, _ in } ) )
169+ guard let moduleNode = context. nodeWithSymbolIdentifier ( " SourceLocations " ) ,
170+ let pathToRoot = context. pathsTo ( moduleNode. reference) . first,
171+ let root = pathToRoot. first else {
172+
173+ XCTFail ( " Module doesn't have technology root as a predecessor in its path " )
174+ return
171175 }
172176
177+ XCTAssertEqual ( root. path, " /documentation/Root " )
173178 XCTAssertEqual ( crawler. problems. count, 0 )
174179
175180 }
@@ -202,12 +207,9 @@ class DocumentationCuratorTests: XCTestCase {
202207 """ . write ( to: url. appendingPathComponent ( " Ancestor.md " ) , atomically: true , encoding: . utf8)
203208 }
204209
205- let crawler = DocumentationCurator . init ( in: context, bundle: bundle)
210+ let _ = DocumentationCurator . init ( in: context, bundle: bundle)
206211 XCTAssert ( context. problems. isEmpty, " Expected no problems. Found: \( context. problems. map ( \. diagnostic. summary) ) " )
207212
208-
209-
210-
211213 guard let moduleNode = context. nodeWithSymbolIdentifier ( " SourceLocations " ) ,
212214 let pathToRoot = context. pathsTo ( moduleNode. reference) . first,
213215 let root = pathToRoot. first else {
0 commit comments