MCPcopy
hub / github.com/vexip-ui/vexip-ui / createScroll

Function createScroll

components/scroll/tests/scroll.spec.tsx:40–59  ·  view source on GitHub ↗
(props: InstanceType<typeof Scroll>['$props'] = {})

Source from the content-addressed store, hash-verified

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) {

Callers 1

scroll.spec.tsxFile · 0.70

Calls 3

mockOffsetWidthFunction · 0.70
mockOffsetHeightFunction · 0.70
mountFunction · 0.50

Tested by

no test coverage detected