neodrag icon indicating copy to clipboard operation
neodrag copied to clipboard

Error when running jest tests.

Open renegarcia225 opened this issue 1 year ago • 0 comments

When running a Jest test i'm getting the following error:

SyntaxError: Cannot use import statement outside a module

This is how i'm importing the library:

import { useDraggable, DragEventData, DragOptions } from '@neodrag/react';

Seems like useDraggable is implemented as an esm moduel which is not compatible with jest.

renegarcia225 avatar Jan 08 '24 05:01 renegarcia225