michaelleeallen / mocha-junit-reporter

A JUnit XML reporter for mocha.
MIT License
144 stars 153 forks source link

Reporter option maxDiffSize is ignored #208

Open eliericha opened 4 months ago

eliericha commented 4 months ago

Mocha supports a reporter option maxDiffSize that configures a threshold beyond which actual and expected strings are trimmed in the report (see Mocha documentation).

When mocha-junit-reporter is used, maxDiffSize is ignored and the report reverts to the default value of 8192.

After some investigation I was able to determine that the reason was that mocha-junit-reporter is assuming that all reporter options are intended for itself, and is not forwarding options to the base reporter implementation. That causes maxDiffSize to be ignored.

I'll submit a fix soon.