We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4055d70 commit 59b6162Copy full SHA for 59b6162
src/directives/v-tooltip.spec.js
@@ -1,4 +1,5 @@
1
import * as VTooltip from './v-tooltip'
2
+import { destroyTooltip } from './v-tooltip'
3
4
jest.mock('../lib/tooltip')
5
@@ -92,3 +93,21 @@ describe('getOptions', () => {
92
93
})
94
95
96
+
97
+describe('destroyTooltip', () => {
98
+ test('is deleted', () => {
99
+ const dispose = jest.fn(x => null)
100
+ const el = {
101
+ _tooltip: {
102
+ dispose: dispose,
103
+ },
104
+ _tooltipOldShow: {},
105
+ }
106
107
+ VTooltip.destroyTooltip(el)
108
109
+ expect(dispose.mock.calls.length).toBe(1)
110
+ expect(el._tooltip).toBeUndefined()
111
+ expect(el._tooltipOldShow).toBeUndefined()
112
+ })
113
+})
0 commit comments