michaelleeallen / mocha-junit-reporter

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

runner.on is not a function #201

Open aorlowskiddm opened 9 months ago

aorlowskiddm commented 9 months ago

I am trying to use mocha-junit-reporter in combination with nyc and ts-mocha.

In package.json I have this excerpt:

  "scripts": {
    "test-ts": "ts-mocha \"./test/**/*.test.ts\"",
    "nyc": "nyc --check-coverage --all --lines 50  --functions 50 --branches 50 --reporter=html --reporter=text --reporter=mocha-junit-reporter npm run test-ts"
  },

After nyc finishes executing and all tests pass, I just see this, and no report is generated:

image

Perhaps mocha-junit-reporter is incompatible with ts-mocha? What is the suggested approach?