Skip to content

Commit

Permalink
chore(tests): print more errors when snapshot tests fail (#5839)
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada authored Jan 19, 2025
1 parent b91985e commit 58748d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/src/IrcMessageHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,11 @@ TEST_P(TestIrcMessageHandlerP, Run)

delete ircMessage;

ASSERT_TRUE(snapshot->run(got, UPDATE_SNAPSHOTS));
ASSERT_TRUE(snapshot->run(got, UPDATE_SNAPSHOTS))
<< "Snapshot " << snapshot->name() << " failed. Expected JSON to be\n"
<< QJsonDocument::fromVariant(snapshot->output().toVariant()).toJson()
<< "\nbut got\n"
<< QJsonDocument(got).toJson() << "\ninstead.";
}

INSTANTIATE_TEST_SUITE_P(
Expand Down

0 comments on commit 58748d0

Please sign in to comment.