Add dart-json & flutter-machine support to main

This commit is contained in:
Michal Dorner 2021-01-06 22:59:30 +01:00
parent cc11acea10
commit ad37e4d3c1
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786

View file

@ -1,6 +1,7 @@
import * as core from '@actions/core'
import * as github from '@actions/github'
import {parseJestJunit} from './parsers/jest-junit/jest-junit-parser'
import {parseDartJson} from './parsers/dart-json/dart-json-parser'
import {ParseOptions, ParseTestResult} from './parsers/test-parser'
import {getFileContent, normalizeDirPath} from './utils/file-utils'
import {listFiles} from './utils/git'
@ -63,10 +64,12 @@ async function main(): Promise<void> {
function getParser(reporter: string): ParseTestResult {
switch (reporter) {
case 'dart-json':
return parseDartJson
case 'dotnet-trx':
throw new Error('Not implemented yet!')
case 'flutter-machine':
throw new Error('Not implemented yet!')
return parseDartJson
case 'jest-junit':
return parseJestJunit
default: