Skip to content

Commit

Permalink
Sort cached fragment report in test output
Browse files Browse the repository at this point in the history
Reviewed By: monicatang

Differential Revision: D69603365

fbshipit-source-id: 6949e0363360ca07615acc9298e72ed554676276
  • Loading branch information
captbaritone authored and facebook-github-bot committed Feb 14, 2025
1 parent 4b80697 commit 4daa9de
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub async fn transform_fixture(fixture: &Fixture<'_>) -> Result<String, String>

// If we didn't error, print out the state of the fragment cache so we can
// validate which entries get populated.
let lines = validator
let mut lines = validator
.visitor
.visited_fragments
.iter()
Expand All @@ -52,6 +52,8 @@ pub async fn transform_fixture(fixture: &Fixture<'_>) -> Result<String, String>
})
.collect::<Vec<_>>();

lines.sort();

if lines.is_empty() {
Ok("OK.\n\nNo Cached Fragments.".to_string())
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ query QueryB($varX: String, $varY: String) {
OK.

Cached Fragments:
FragmentD -> POPULATED ("varX, varY")
FragmentC -> POPULATED ("varX, varY")
FragmentD -> POPULATED ("varX, varY")
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ fragment AnotherUser_data on User {
OK.

Cached Fragments:
AnotherUser_data -> POPULATED ("foo")
User_data -> POPULATED ("foo")
User_data_with_args -> POPULATED ("foo")
AnotherUser_data -> POPULATED ("foo")

0 comments on commit 4daa9de

Please sign in to comment.