all files / core/results/ test-case-result.ts

78.95% Statements 15/19
50% Branches 3/6
75% Functions 3/4
73.33% Lines 11/15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29             1312×               1312×     1310×     5044×  
import { TestOutcome } from "./test-outcome";
import { ITest } from "../_interfaces/test.i";
import { MatchError } from "../_errors";
 
export class TestCaseResult {
 
   public arguments() {
      return this._arguments;
   }
 
   get outcome(): TestOutcome {
      Iif (this._error) {
         if (this._error instanceof MatchError) {
            return TestOutcome.Fail;
         }
 
         return TestOutcome.Error;
      }
 
      if (this._test.ignored) {
         return TestOutcome.Skip;
      }
 
      return TestOutcome.Pass;
   }
 
   public constructor(private _test: ITest, private _arguments: Array<any>, private _error?: Error) { }
}