summaryrefslogtreecommitdiff
path: root/testing/pretty.ts
diff options
context:
space:
mode:
Diffstat (limited to 'testing/pretty.ts')
-rw-r--r--testing/pretty.ts14
1 files changed, 8 insertions, 6 deletions
diff --git a/testing/pretty.ts b/testing/pretty.ts
index f4794f889..b2ab79d70 100644
--- a/testing/pretty.ts
+++ b/testing/pretty.ts
@@ -18,9 +18,9 @@ function createStr(v: unknown): string {
function createColor(diffType: DiffType): (s: string) => string {
switch (diffType) {
case DiffType.added:
- return (s: string) => green(bold(s));
+ return (s: string): string => green(bold(s));
case DiffType.removed:
- return (s: string) => red(bold(s));
+ return (s: string): string => red(bold(s));
default:
return white;
}
@@ -46,10 +46,12 @@ function buildMessage(diffResult: ReadonlyArray<DiffResult<string>>): string[] {
);
messages.push("");
messages.push("");
- diffResult.forEach((result: DiffResult<string>) => {
- const c = createColor(result.type);
- messages.push(c(`${createSign(result.type)}${result.value}`));
- });
+ diffResult.forEach(
+ (result: DiffResult<string>): void => {
+ const c = createColor(result.type);
+ messages.push(c(`${createSign(result.type)}${result.value}`));
+ }
+ );
messages.push("");
return messages;