Provide custom Jest environment with mocked console
What does this MR do?
Make sure that console.warn()
and console.error()
fail the corresponding test in Jest. This also catches Vue warnings like missing required props or props of wrong type (https://github.com/vuejs/vue/blob/v2.6.10/src/core/util/debug.js#L24) and Boostrap Vue warnings (https://github.com/bootstrap-vue/bootstrap-vue/blob/v2.0.0-rc.15/src/utils/warn.js#L7).
What are the relevant issue numbers?
closes https://gitlab.com/gitlab-org/gitlab-ce/issues/58203
Does this MR meet the acceptance criteria?
-
Changelog entry added, if necessary -
Documentation created/updated via this MR -
Documentation reviewed by technical writer or follow-up review issue created -
Tests added for this feature/bug -
Tested in all supported browsers -
Conforms to the code review guidelines -
Conforms to the merge request performance guidelines -
Conforms to the style guides -
Conforms to the database guides -
Link to e2e tests MR added if this MR has Requires e2e tests label. See the Test Planning Process. -
Security reports checked/validated by reviewer
Edited by Inactive Account