File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 27
27
28
28
expect ( comparator . errors ) . to be_empty , "There were comparison errors: #{ comparator . errors } "
29
29
end
30
+
31
+ it 'ensures a consistent `testRunStartedId` across the entire test run' do
32
+ # Step 1) Grab testRunStarted[:id]
33
+ test_run_message = parsed_generated . detect { |msg | message_type ( msg ) == :test_run_started }
34
+ id = test_run_message . test_run_started . id
35
+
36
+ # Step 2) Validate every testCase has a [:testRunStartedId] equal to the above
37
+ # Step 3) Validate the single testRunFinished [:testRunStartedId] equal to the above
38
+ messages_types_containing_test_run_started_id = %i[ test_case test_run_finished ]
39
+ messages_containing_test_run_started_id = parsed_generated . select { |msg | messages_types_containing_test_run_started_id . include? ( message_type ( msg ) ) }
40
+ ids = messages_containing_test_run_started_id . map { |msg | msg . send ( message_type ( msg ) ) . test_run_started_id }
41
+
42
+ expect ( ids ) . to all eq ( id )
43
+ end
30
44
end
You can’t perform that action at this time.
0 commit comments