Skip to content

Commit 388b072

Browse files
committed
Add RenderIndex test with namespace node.
1 parent 3b7f138 commit 388b072

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

Tests/SwiftDocCTests/Indexing/RenderIndexTests.swift

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,29 @@ final class RenderIndexTests: XCTestCase {
561561
XCTAssertTrue(try XCTUnwrap(renderIndex.interfaceLanguages["swift"])[0].isBeta)
562562
}
563563
}
564+
565+
func testRenderIndexGenerationWithNamespaceNode() throws {
566+
try testRenderIndexGenerationFromJSON("""
567+
{
568+
"interfaceLanguages": {
569+
"occ": [
570+
{
571+
"path": "/documentation/framework/foo",
572+
"title": "Foo",
573+
"type": "namespace"
574+
}
575+
]
576+
},
577+
"schemaVersion": {
578+
"major": 0,
579+
"minor": 1,
580+
"patch": 0
581+
}
582+
}
583+
""") { renderIndex in
584+
XCTAssertTrue(try XCTUnwrap(renderIndex.interfaceLanguages["occ"])[0].type == "namespace")
585+
}
586+
}
564587

565588
func makeRenderIndexJSONSingleNode(withOptionalProperty property: String) -> String {
566589
return """

0 commit comments

Comments
 (0)