patternfly / patternfly-react

A set of React components for the PatternFly project.
https://react-staging.patternfly.org/
MIT License
794 stars 356 forks source link

Can't run tests on components that use PF4 Datatoolbar #3835

Closed boaz0 closed 4 years ago

boaz0 commented 4 years ago

Describe the issue. What is the expected and unexpected behavior? I can not run tests on components that use PF4 Datatoolbar (it doesn't matter if I'm using enzyme or @testing-library/react I get this error message:

  ● Test suite failed to run                                                                     

    /home/deadsamuraikiddo/code/koku-ui/node_modules/@patternfly/react-core/dist/esm/experimenta$
/index.js:1                                                                                      
    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){exp$
rt * from './components';

Please provide the steps to reproduce. Feel free to link CodeSandbox or another tool.

Is this a bug or enhancement? If this issue is a bug, is this issue blocking you or is there a work-around?

This is a bug and consider this as blocking - because I cannot test my code.

What is your product and what release version are you targeting? Product: Cost management patternfly/react-core v3.140.11

tlabaj commented 4 years ago

cc @redallen @evwilkin

redallen commented 4 years ago

@boaz0 I believe this is a jest issue on your end, probably because you're using import { DataToolbar } from '@patternfly/react-core/dist/esm/experimental after upgrading to our latest release which did away with experimental. Try import { DataToolbar } from '@patternfly/react-core'; instead.

If this doesn't work, I can take some time to help debug inside your product.

boaz0 commented 4 years ago

Thanks @redallen - I will test this today and close if it fixes the problem. Thanks :)

boaz0 commented 4 years ago

Fixed - thanks