It turned out that the Mocha-Webpack package doesn’t have support for Webpack 4 yet. (OMG this JS ecosystem! 😅)
Testing Vue Components with Mocha and Webpack
Stefan Ledin
2084

I did read this part but did not take it seriously. Wasted so much time for neglecting this. The vue’s mocka-webpack example repo on: https://github.com/vuejs/vue-test-utils-mocha-webpack-example uses `webpack: ^3.6.0`.

The webpack installed with npm i -D webpack is webpack: ^4.22.0

Installing the npm install mocha-webpack@next did solve my problem.

Another lesson for why you should pay attention to versions learned in a hard way.

Anyways THANKS FOR THE ARTICLE!