Hi,
The package which is published to npm is using import syntax and it breaks tests when your are using default setup created by create-react-app.
I get this error when running tests which use react-bootstrap-sweetalert:
({"Object.<anonymous>":function(module,exports,require,__dirname,__filename,global,jest){import SweetAlert from "./components/SweetAlert";
^^^^^^
SyntaxError: Cannot use import statement outside a module
Hi, The package which is published to npm is using import syntax and it breaks tests when your are using default setup created by
create-react-app
. I get this error when running tests which usereact-bootstrap-sweetalert
:I've created this simple example where you can see the issue https://github.com/mjetek/test-react-bootstrap-sweetalert