Skip to content

Commit 4f125c7

Browse files
authored
display enum named value in log output (#110)
1 parent 1eec82d commit 4f125c7

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

PublishTestPlanResultsV1/processing/TestResultProcessor.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { TestPoint, TestPlan } from "azure-devops-node-api/interfaces/TestInterfaces";
1+
import { TestPoint, TestPlan, TestOutcome } from "azure-devops-node-api/interfaces/TestInterfaces";
22
import { TestResultContext } from "../context/TestResultContext";
33
import { TestFrameworkResult } from "../framework/TestFrameworkResult";
44
import { TestResultMatch, TestResultMatchStrategy } from "./TestResultMatchStrategy";
@@ -73,7 +73,7 @@ export class TestResultProcessor {
7373
this.logger.info(`| Test Point | Automated Test | TestOutcome |`);
7474
this.logger.info('|------------|----------------|-------------|');
7575
result.matches.forEach( (value, key) => {
76-
this.logger.info(`| ${key} | ${value.name} | ${value.outcome} |`);
76+
this.logger.info(`| ${key} | ${value.name} | ${TestOutcome[value.outcome]} |`);
7777
});
7878
}
7979
if (result.unmatched.length > 0) {
@@ -94,7 +94,7 @@ export class TestResultProcessor {
9494
this.matchers.some( matcher => {
9595

9696
let matchResult = matcher.isMatch( testResult, testPoint );
97-
this.logger.debug(`Strategy: ${matcher.constructor.name} | TestPoint: ${testPoint.id} | MatchResult: ${matchResult.toString()} `);
97+
this.logger.debug(`Strategy: ${matcher.constructor.name} | TestPoint: ${testPoint.id} | MatchResult: ${TestResultMatch[matchResult]} `);
9898

9999
if (matchResult == TestResultMatch.Fail) {
100100
match = false;

0 commit comments

Comments
 (0)