Skip to content

Add unit tests for mounting widgets

What does this MR do and why?

From this MR review comment 🔗

This MR adds unit tests for the MR widget app component (app/.../vue_merge_request_widget/components/widget/app.vue and ee/.../vue_merge_request_widget/components/widget/app.vue) to make sure that it mounts each MR widget component when it's appropriate to do so (and doesn't mount it when it's not appropriate).

How to set up and validate locally

git checkout mfluharty-add-unit-tests-for-rendering-v2-widgets
yarn install
yarn jest vue_merge_request_widget/components/widget/app_spec.js

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Miranda Fluharty

Merge request reports