refactor(std/testing): Get rid of default export and make std/testing/diff.ts private (#7592)

This commit is contained in:
tokiedokie 2020-10-02 02:15:05 +09:00 committed by GitHub
parent e077b93d77
commit 5590b97670
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View file

@ -36,7 +36,7 @@ function createCommon<T>(A: T[], B: T[], reverse?: boolean): T[] {
return common; return common;
} }
export default function diff<T>(A: T[], B: T[]): Array<DiffResult<T>> { export function diff<T>(A: T[], B: T[]): Array<DiffResult<T>> {
const prefixCommon = createCommon(A, B); const prefixCommon = createCommon(A, B);
const suffixCommon = createCommon( const suffixCommon = createCommon(
A.slice(prefixCommon.length), A.slice(prefixCommon.length),

View file

@ -1,5 +1,5 @@
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. // 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"; import { assertEquals } from "../testing/asserts.ts";
Deno.test({ Deno.test({

View file

@ -3,7 +3,7 @@
* for AssertionError messages in browsers. */ * for AssertionError messages in browsers. */
import { bold, gray, green, red, stripColor, white } from "../fmt/colors.ts"; 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]"; const CAN_NOT_DISPLAY = "[Cannot display]";