Skip to content

Commit

Permalink
refactor(std/testing): Get rid of default export and make std/testing…
Browse files Browse the repository at this point in the history
…/diff.ts private (denoland#7592)
  • Loading branch information
tokiedokie authored Oct 1, 2020
1 parent e077b93 commit 5590b97
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion std/testing/diff.ts → std/testing/_diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function createCommon<T>(A: T[], B: T[], reverse?: boolean): T[] {
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 suffixCommon = createCommon(
A.slice(prefixCommon.length),
Expand Down
2 changes: 1 addition & 1 deletion std/testing/diff_test.ts → std/testing/_diff_test.ts
Original file line number Diff line number Diff line change
@@ -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({
Expand Down
2 changes: 1 addition & 1 deletion std/testing/asserts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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]";

Expand Down

0 comments on commit 5590b97

Please sign in to comment.