zinserjan/mocha-webpack

Dies silently

Opened this issue · 1 comments

This is strange, so please stick with me....

I'm running node 8.14 for reasons beyond my control, webpack 4.16.5, and mocha-webpack 1.1.0

I've got webpack and babel running without issue, mocha-webpack running after some hacking.

The 'hacking' is of the transpiled JavaScript (in lib) --- I've had to make a couple of changes which I don't understand.

In getBuildStats I had to change

if (chunk.isInitial ? chunk.isInitial() : chunk.initial) {

to

if (chunk.isInitial ? chunk.isInitial() : chunk.hasOwnProperty('initial')) {

Similarly, in sortChunk,

if (chunk.parents) {

to

if (chunk.hasOwnProperty('parents')) {

After that, the mocha-webpack run does actually complete, and no longer dies silently.

It does not run my specified test, yet, but I'm hopeful....!

@leegee This project is no longer maintained, we didn't hear from the author since May 2018. We are maintaining the fork here:
https://github.com/sysgears/mochapack
Feel free to try it and create the issue there if you will still have this problem.