michaelleeallen / mocha-junit-reporter

A JUnit XML reporter for mocha.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

runner.on is not a function

aorlowskiddm opened this issue · comments

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?