Testing AWS UI components with Jest

Developers who have recently installed AWS’s new UI component library may quickly run into trouble with their unit tests. AWS UI is written in ECMAScript, and Jest cannot import it by default.

Jest encountered an unexpected token.

The full error will look something like this: