(props: InstanceType<typeof Scroll>['$props'] = {})
| 38 | let wrapper: ReturnType<typeof createScroll> | null |
| 39 | |
| 40 | function createScroll(props: InstanceType<typeof Scroll>['$props'] = {}) { |
| 41 | const scroll = mount(Scroll, { |
| 42 | props: { |
| 43 | mode: 'both', |
| 44 | width: 200, |
| 45 | height: 200, |
| 46 | ...props, |
| 47 | }, |
| 48 | slots: { |
| 49 | default: () => <span class={'content'}>{TEXT}</span>, |
| 50 | }, |
| 51 | }) |
| 52 | |
| 53 | const contentEl = scroll.find('.vxp-scroll__wrapper').element as HTMLElement |
| 54 | |
| 55 | mockOffsetWidth(contentEl, 400) |
| 56 | mockOffsetHeight(contentEl, 400) |
| 57 | |
| 58 | return scroll |
| 59 | } |
| 60 | |
| 61 | afterEach(() => { |
| 62 | if (mocked.length) { |
no test coverage detected