Tests are failing

54 views Asked by At

I am trying to run Jest test runner on my react project and I am using third-party UI library called semantic-ui-react. When I write simple tests and run then, they are running successfully but when I import any component from semantic-ui-react and test my custom component, I am getting the below error.

Test suite failed to run

/xxx/node_modules/semantic-ui-react/index.js:1
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){export * from 'semantic-ui-react';
                                                                                         ^^^^^^

SyntaxError: Unexpected token export 

** dependency versions: **

"babel-jest": "^21.0.0",
"jest": "^21.0.1",
"enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.5",
"enzyme-to-json": "^3.6.1",

Please help. Thanks in advance.

0

There are 0 answers