summaryrefslogtreecommitdiff
path: root/testing/pretty.ts
diff options
context:
space:
mode:
authorVincent LE GOFF <g_n_s@hotmail.fr>2019-03-05 20:58:28 +0100
committerRyan Dahl <ry@tinyclouds.org>2019-03-05 14:58:28 -0500
commit787207f11bfcd657b93b47f2ffeb457cdd6f4eb0 (patch)
treeac71143a059261805d4c5750a7254583714397d7 /testing/pretty.ts
parent39fde3a454b6bcc7daa6bca4fb7f4317550e9e58 (diff)
Refactor asserts in testing (denoland/deno_std#227)
Original: https://github.com/denoland/deno_std/commit/c734e3234322cea5298a887373fe4ad1591d7c97
Diffstat (limited to 'testing/pretty.ts')
-rw-r--r--testing/pretty.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/pretty.ts b/testing/pretty.ts
index 737d9c6dd..05fd86b6f 100644
--- a/testing/pretty.ts
+++ b/testing/pretty.ts
@@ -17,9 +17,9 @@ function createStr(v: unknown): string {
function createColor(diffType: DiffType): (s: string) => string {
switch (diffType) {
- case "added":
+ case DiffType.added:
return (s: string) => green(bold(s));
- case "removed":
+ case DiffType.removed:
return (s: string) => red(bold(s));
default:
return white;
@@ -28,9 +28,9 @@ function createColor(diffType: DiffType): (s: string) => string {
function createSign(diffType: DiffType): string {
switch (diffType) {
- case "added":
+ case DiffType.added:
return "+ ";
- case "removed":
+ case DiffType.removed:
return "- ";
default:
return " ";