sortable-dnd icon indicating copy to clipboard operation
sortable-dnd copied to clipboard

Fix for component testing

Open jaca1119 opened this issue 1 year ago • 1 comments

Hi! If someone will test VueVirtualDragList in component test using e.g. Vitest then this line will fail -> https://github.com/mfuu/sortable-dnd/blob/ab5f10b74733f5184f269d20cc63d87aa5669c19/src/utils.js#L52 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?

jaca1119 avatar Mar 22 '24 10:03 jaca1119

This issue has been resolved in version 0.6.11 and later.

mfuu avatar Apr 16 '24 01:04 mfuu