Skip to content

Commit 86eed7a

Browse files
ihabadhamclaude
andcommitted
Add request spec variant exercising populated CommentsFeed
Existing /rsc_payload/ServerComponentsPage spec sent empty {} props, which only exercises the empty-state branch of CommentsFeed. The new variant passes a realistic comment so the marked + sanitize-html markdown rendering path and the comment list mapping are covered. Verified locally: 4/4 examples pass against the running renderer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent e2c76a5 commit 86eed7a

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

spec/requests/server_components_spec.rb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ def expect_valid_rsc_payload
3232
expect_valid_rsc_payload
3333
end
3434

35+
it "streams a valid RSC payload for ServerComponentsPage with populated comments" do
36+
now = 1.minute.ago.iso8601
37+
comments = [
38+
{ id: 1, author: "Alice", text: "Hello **markdown**", created_at: now, updated_at: now },
39+
]
40+
get "/rsc_payload/ServerComponentsPage", params: { props: { comments: comments }.to_json }
41+
expect_valid_rsc_payload
42+
end
43+
3544
it "streams a valid RSC payload for LiveActivity" do
3645
get "/rsc_payload/LiveActivity", params: { props: "{}" }
3746
expect_valid_rsc_payload

0 commit comments

Comments
 (0)