Page MenuHomePhabricator

Create tests to ensure that actions and mutations that are called by with the correct arguments by other actions
Open, Needs TriagePublic


We had twice the case that context.commit or context.dispatch was called with wrong arguments. Since these methods were mocked in tests, the tests did not these errors.
We should have tests that do not mock context.commit and context.dispatch and ensure that the action or mutation was called with the arguments that _it_ expects.

acceptance criteria

  • We have automated tests (unit or integration) for actions that do not mock the actions/mutations called within, but assert they are called with the arguments they _actually_ expect. These tests must fail when the signature of the called actions/mutations changes.

Event Timeline

Michael created this task.Jul 18 2019, 10:51 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJul 18 2019, 10:51 AM

@Michael please determine whether this task is still relevant. If so, please check the title and the description. thanks!!

From the merged commits I cannot see anything that suggests that this ticket has been implemented. Therefore, I consider this to still be relevant and title is still accurate. I will add explicit AC, if that is needed.

Michael updated the task description. (Show Details)Jul 31 2019, 8:07 AM

Maybe the other way around this is to have explicit type safety on the methods itself: