From 008b6a4b2f732e40a1be340d0a6279dd58593c34 Mon Sep 17 00:00:00 2001 From: tokiedokie Date: Sun, 20 Sep 2020 12:49:17 +0900 Subject: [PATCH 1/2] get rid export default --- std/testing/asserts.ts | 2 +- std/testing/diff.ts | 2 +- std/testing/diff_test.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts index 9796c9d31aa383..27d2638efde451 100644 --- a/std/testing/asserts.ts +++ b/std/testing/asserts.ts @@ -3,7 +3,7 @@ * for AssertionError messages in browsers. */ import { red, green, white, gray, bold, stripColor } from "../fmt/colors.ts"; -import diff, { DiffType, DiffResult } from "./diff.ts"; +import { diff, DiffType, DiffResult } from "./diff.ts"; const CAN_NOT_DISPLAY = "[Cannot display]"; diff --git a/std/testing/diff.ts b/std/testing/diff.ts index 3a9eca4bba1c71..5c84e891fe3f0f 100644 --- a/std/testing/diff.ts +++ b/std/testing/diff.ts @@ -36,7 +36,7 @@ function createCommon(A: T[], B: T[], reverse?: boolean): T[] { return common; } -export default function diff(A: T[], B: T[]): Array> { +export function diff(A: T[], B: T[]): Array> { const prefixCommon = createCommon(A, B); const suffixCommon = createCommon( A.slice(prefixCommon.length), diff --git a/std/testing/diff_test.ts b/std/testing/diff_test.ts index 072f396220bf19..5ac98f07bbb5d3 100644 --- a/std/testing/diff_test.ts +++ b/std/testing/diff_test.ts @@ -1,4 +1,4 @@ -import diff from "./diff.ts"; +import { diff } from "./diff.ts"; import { assertEquals } from "../testing/asserts.ts"; Deno.test({ From e05936305a204d5c3164f199d7be30bc089bc9a6 Mon Sep 17 00:00:00 2001 From: tokiedokie Date: Mon, 21 Sep 2020 08:29:08 +0900 Subject: [PATCH 2/2] make diff.ts private --- std/testing/{diff.ts => _diff.ts} | 0 std/testing/{diff_test.ts => _diff_test.ts} | 2 +- std/testing/asserts.ts | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename std/testing/{diff.ts => _diff.ts} (100%) rename std/testing/{diff_test.ts => _diff_test.ts} (98%) diff --git a/std/testing/diff.ts b/std/testing/_diff.ts similarity index 100% rename from std/testing/diff.ts rename to std/testing/_diff.ts diff --git a/std/testing/diff_test.ts b/std/testing/_diff_test.ts similarity index 98% rename from std/testing/diff_test.ts rename to std/testing/_diff_test.ts index 5ac98f07bbb5d3..9bc64371310c2d 100644 --- a/std/testing/diff_test.ts +++ b/std/testing/_diff_test.ts @@ -1,4 +1,4 @@ -import { diff } from "./diff.ts"; +import { diff } from "./_diff.ts"; import { assertEquals } from "../testing/asserts.ts"; Deno.test({ diff --git a/std/testing/asserts.ts b/std/testing/asserts.ts index 27d2638efde451..e082f4ab89a656 100644 --- a/std/testing/asserts.ts +++ b/std/testing/asserts.ts @@ -3,7 +3,7 @@ * for AssertionError messages in browsers. */ import { red, green, white, gray, bold, stripColor } from "../fmt/colors.ts"; -import { diff, DiffType, DiffResult } from "./diff.ts"; +import { diff, DiffType, DiffResult } from "./_diff.ts"; const CAN_NOT_DISPLAY = "[Cannot display]";