Closed mqliutie closed 6 years ago
@mqliutie It didn't break the tests. I would call that successful, but I'm not sure what your goal is.
Test is successful but there is full of screen tip of the css
Now my solution is using webpack alias import this plugin and test set global variable to using another plugin that is no css in js.
This plugin not import any css file but add stylesheet
to head element.
Show you below
if (typeof document !== "undefined"){!function(e,t){var n=e.createElement("style");if(e.getElementsByTagName("head")[0].appendChild(n),n.styleSheet)n.styleSheet.disabled||(n.styleSheet.cssText=t);else try{n.innerHTML=t}catch(e){n.innerText=t}}(document,"@-webkit-keyframes swal2-show {\n" +
" 0% {\n" +
" -webkit-transform: scale(0.7);\n" +
" transform: scale(0.7); }\n" +
" 45% {\n" +
" -webkit-transform: scale(1.05);\n" +
" transform: scale(1.05); }\n" +
" 80% {\n" +
" -webkit-transform: scale(0.95);\n" +
" transform: scale(0.95); }\n" +
" 100% {\n" +
" -webkit-transform: scale(1);\n" +
" transform: scale(1); } }\n" +
In jest imported js I removed these code
I think this is unrelated to Jest. I think people who know sweetalert2 can help you better.
Thanks for your help
in
teamAmerica.test.js
I added one lineand
Test Suites: 1 passed, 1 total Tests: 1 passed, 1 total Snapshots: 1 passed, 1 total
Is this successful?