pubsweet ui toolkit problem while running jest
The case is:
After change the th import from @pubsweet/ui to @pubsweet/toullkit-ui and try to run jest, it fails with an error:
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import { darken, lighten } from './src/darkenLighten';
^^^^^^
SyntaxError: Unexpected token import
The problem does only occur on jest and when you try to run jest for that specific component
Example if i run command from pubsweet folder:
FAILS: jest packages/components/xpub-dashboard/*
SUCCESS: jest