jeudi 25 juin 2020

Why does Jest prints minified code to console after tests are done?

Every time I run a test and it fails, Jest proceeds to print minified code for the next minute or so then prints console.log statements.

I run my tests with

 jest -- brands.test.js --forceExit --detectOpenHandles

But after that's done, Jest informs me that the test failed

FAIL  build/tests/src/unit/dao/brands.test.js
  Test Model - Brands
    ✕ should create a new brand (183 ms)

Then proceeds to print minified code

    > 1 | module.exports=function(e,t){"use strict";var n={};function __webpack_require__(t){if(n[t]){return n[t].exports}var r=n[t]={i:t,l:false,exports:{}};e[t].call(r.exports,r,r.exports,__webpack_require__);r.l=true;return r.exports}__webpack_require__.ab=__dirname+"/";function startup(){return __webpack_require__(911)}t(__webpack_require__);return startup()}({6:function(e,t,n){"use strict";var r=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:true});t.getPlatform=t.getOpenSSLVersion=t. ....blah blah

Before getting to my log statements after all the text is done printing (a minute or two) Any ideas how to solve it?

Aucun commentaire:

Enregistrer un commentaire