Description
ResourceEventsTestSuite was never covered by the summer 2024 refactor campaign. It is 544 lines reporting only 3 results:
| Fact |
Asserts |
Lines |
event_perform_object_test |
3 |
238 |
event_perform_test |
2 |
229 |
event_user_test |
1 |
75 |
The low assert count relative to the line count is itself the problem: these facts perform a long sequence of event dispatches and then assert once or twice at the end over accumulated state. So as well as splitting, this suite needs additional asserts so that each individual event dispatch is verified rather than only the aggregate outcome.
Target: one fact per event type dispatched, with an assert per dispatch — likely 40+ facts. The exact number should be settled by the audit in step 1.
This is the most open-ended of the remaining refactors, because it is as much a coverage improvement as a split. It may be worth doing after the more mechanical suites.
Script Name
ResourceEventsTestSuite
Steps To The Task
Description
ResourceEventsTestSuitewas never covered by the summer 2024 refactor campaign. It is 544 lines reporting only 3 results:event_perform_object_testevent_perform_testevent_user_testThe low assert count relative to the line count is itself the problem: these facts perform a long sequence of event dispatches and then assert once or twice at the end over accumulated state. So as well as splitting, this suite needs additional asserts so that each individual event dispatch is verified rather than only the aggregate outcome.
Target: one fact per event type dispatched, with an assert per dispatch — likely 40+ facts. The exact number should be settled by the audit in step 1.
This is the most open-ended of the remaining refactors, because it is as much a coverage improvement as a split. It may be worth doing after the more mechanical suites.
Script Name
ResourceEventsTestSuite
Steps To The Task
<original_name> #N