diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 21:07:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-20 21:07:53 +0300 |
commit | 682360490629376e2ec07d737c7d7dbfdaaeeab7 (patch) | |
tree | 7abe62a4d200738ac086ac0c0bd633ce0bc03f00 /spec/frontend/__mocks__ | |
parent | 2f26f81ce3e3f97ddc5ce5e2e103925d7d0d170f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/frontend/__mocks__')
-rw-r--r-- | spec/frontend/__mocks__/@gitlab/ui.js | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/spec/frontend/__mocks__/@gitlab/ui.js b/spec/frontend/__mocks__/@gitlab/ui.js new file mode 100644 index 00000000000..ef97cb11424 --- /dev/null +++ b/spec/frontend/__mocks__/@gitlab/ui.js @@ -0,0 +1,19 @@ +export * from '@gitlab/ui'; + +/** + * The @gitlab/ui tooltip directive requires awkward and distracting set up in tests + * for components that use it (e.g., `attachToDocument: true` and `sync: true` passed + * to the `mount` helper from `vue-test-utils`). + * + * This mock decouples those tests from the implementation, removing the need to set + * them up specially just for these tooltips. + */ +export const GlTooltipDirective = { + bind() {}, +}; + +export const GlTooltip = { + render(h) { + return h('div', this.$attrs, this.$slots.default); + }, +}; |