Add support for mocha-json

This commit is contained in:
Michal Dorner
2021-02-23 22:39:35 +01:00
parent f285c4c6d7
commit 9b675bd55f
21 changed files with 1588 additions and 59 deletions

View File

@@ -13,6 +13,7 @@ import {getReport} from './report/get-report'
import {DartJsonParser} from './parsers/dart-json/dart-json-parser'
import {DotnetTrxParser} from './parsers/dotnet-trx/dotnet-trx-parser'
import {JestJunitParser} from './parsers/jest-junit/jest-junit-parser'
import {MochaJsonParser} from './parsers/mocha-json/mocha-json-parser'
import {normalizeDirPath} from './utils/path-utils'
import {getCheckRunContext} from './utils/github-utils'
@@ -186,6 +187,8 @@ class TestReporter {
return new DartJsonParser(options, 'flutter')
case 'jest-junit':
return new JestJunitParser(options)
case 'mocha-json':
return new MochaJsonParser(options)
default:
throw new Error(`Input variable 'reporter' is set to invalid value '${reporter}'`)
}