Skip to content

Commit

Permalink
Get rid of static
Browse files Browse the repository at this point in the history
  • Loading branch information
Jameskmonger committed Sep 23, 2016
1 parent 50bb0c3 commit 0dd80f4
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/unit-tests/test-output/emit-result.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import { ITest } from "../../../core/_interfaces";
import { TestBuilder } from "../../builders/test-builder";
import { OutputStreamBuilder } from "../../builders/output-stream-builder";

export class EmitResultTests {
const _getErrorYaml: (error: MatchError) => string = (error: MatchError) => {
return ` ---\n message: "${error.message.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"\n severity: fail\n data:\n got: ${JSON.stringify(error.actualValue)}\n expect: ${JSON.stringify(error.expectedValue)}\n ...\n`;
};

private static _getErrorYaml(error: MatchError): string {
return ` ---\n message: "${error.message.replace(/\\/g, "\\\\").replace(/"/g, "\\\"")}"\n severity: fail\n data:\n got: ${JSON.stringify(error.actualValue)}\n expect: ${JSON.stringify(error.expectedValue)}\n ...\n`;
}
export class EmitResultTests {

@TestCase(1)
@TestCase(2)
Expand Down Expand Up @@ -182,7 +182,7 @@ export class EmitResultTests {

let testCaseResult = new TestCaseResult(test, [], error);

let expected = EmitResultTests._getErrorYaml(error);
let expected = _getErrorYaml(error);

testOutput.emitResult(1, testCaseResult);

Expand All @@ -204,7 +204,7 @@ export class EmitResultTests {

let testCaseResult = new TestCaseResult(test, [], error);

let expected = EmitResultTests._getErrorYaml(error);
let expected = _getErrorYaml(error);

testOutput.emitResult(1, testCaseResult);

Expand All @@ -226,7 +226,7 @@ export class EmitResultTests {

let testCaseResult = new TestCaseResult(test, [], error);

let expected = EmitResultTests._getErrorYaml(error);
let expected = _getErrorYaml(error);

testOutput.emitResult(1, testCaseResult);

Expand Down

0 comments on commit 0dd80f4

Please sign in to comment.