Test `diffs/app.vue` as a whole component instead of by mocking individual function internals
<!--IssueSummary start-->
<details>
<summary>
Everyone can contribute. [Help move this issue forward](https://handbook.gitlab.com/handbook/marketing/developer-relations/contributor-success/community-contributors-workflows/#contributor-links) while earning points, leveling up and collecting rewards.
</summary>
- [Close this issue](https://contributors.gitlab.com/manage-issue?action=close&projectId=278964&issueIid=215924)
</details>
<!--IssueSummary end-->
Follow-up from: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/29830#note_329133936
Rough paraphrase:
>>>
what counts as the *public* API of a vue component? Three things: `props`, `events`, and `render`. These are the mechanisms a vue component uses to communicate outside of itself.
>>>
>>>
Consider this though: every mock made under the `wrapper.vm` is a mocking of *private implementation detail*, which, when it comes to unit testing, is usually the very thing we are attempting to test.
>>>
>>>
I would consider the "unit-to-be-tested" here the component, and the behaviour of the component, instead of individual `watchers`, `methods`, etc. on the component. Consider the components "internals" (`watchers`, `computed`, `methods`, etc.) as the private API of the component. Generally, I try not to test *just* the private API, but instead the effect the private API has.
>>>
A huge proportion (close to 100%, with the exception of [a single mocked endpoint](https://gitlab.com/gitlab-org/gitlab/-/blob/282202ef509eb231d65252dddf306529094b1328/spec/frontend/diffs/components/app_spec.js#L74)) of the `diffs` `app.vue` tests the internals (as defined above, methods, computeds, etc.) of the component ([one example, others throughout the file](https://gitlab.com/gitlab-org/gitlab/-/blob/282202ef509eb231d65252dddf306529094b1328/spec/frontend/diffs/components/app_spec.js#L96-103)) rather than its external (public) API.
We should explore moving the test mocks/spies to the "effect the private API has" rather than circumventing those effects from ever happening.
issue