From 7c89871ed2d2e50f8c6a8332f0c3562d1037879d Mon Sep 17 00:00:00 2001 From: tokiedokie Date: Fri, 2 Oct 2020 02:15:05 +0900 Subject: [PATCH] refactor(testing): Get rid of default export and make testing/diff.ts private (denoland/deno#7592) --- testing/{diff.ts => _diff.ts} | 2 +- testing/{diff_test.ts => _diff_test.ts} | 2 +- testing/asserts.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) rename testing/{diff.ts => _diff.ts} (98%) rename testing/{diff_test.ts => _diff_test.ts} (98%) diff --git a/testing/diff.ts b/testing/_diff.ts similarity index 98% rename from testing/diff.ts rename to testing/_diff.ts index 3a9eca4bba1c..5c84e891fe3f 100644 --- a/testing/diff.ts +++ b/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/testing/diff_test.ts b/testing/_diff_test.ts similarity index 98% rename from testing/diff_test.ts rename to testing/_diff_test.ts index 33752d89fcc8..211a34c3479b 100644 --- a/testing/diff_test.ts +++ b/testing/_diff_test.ts @@ -1,5 +1,5 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. -import diff from "./diff.ts"; +import { diff } from "./_diff.ts"; import { assertEquals } from "../testing/asserts.ts"; Deno.test({ diff --git a/testing/asserts.ts b/testing/asserts.ts index 889a622fd923..f93e043dc668 100644 --- a/testing/asserts.ts +++ b/testing/asserts.ts @@ -3,7 +3,7 @@ * for AssertionError messages in browsers. */ import { bold, gray, green, red, stripColor, white } from "../fmt/colors.ts"; -import diff, { DiffResult, DiffType } from "./diff.ts"; +import { diff, DiffResult, DiffType } from "./_diff.ts"; const CAN_NOT_DISPLAY = "[Cannot display]";