I'm trying to do tests on an SPFx project with Jest and Enzyme. I have configured the environment using Andrew Connel's preset to test my solution with React and Typescript.

After run 'npm test' I've encountered this error on a component that uses Dropdown of Office Fabric UI component:

    ({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){export * from './Dropdown';

    SyntaxError: Unexpected token export

Can you suggest me the right configuration of Jest for these type of imports?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.