Skip to content

Fix for component testing #55

@jaca1119

Description

@jaca1119

Hi!
If someone will test VueVirtualDragList in component test using e.g. Vitest then this line will fail ->

const dom = 'WebKit|Moz|MS|O'.match(new RegExp('(' + pre + ')', 'i'))[1];

because pre=undefined

For me it works when I add some default (webkit at last line)

  const pre = (Array.prototype.slice
    .call(styles)
    .join('')
    .match(/-(moz|webkit|ms)-/) ||
    (styles.OLink === '' && ['', 'o']))[1] || 'webkit';

So I'm thinking about how to handle it because otherwise it isn't possible to test components that use this library under the hood. WDYT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions