Skip to content

Commit

Permalink
refactor(testing): Get rid of default export and make testing/diff.ts…
Browse files Browse the repository at this point in the history
… private (denoland/deno#7592)
  • Loading branch information
tokiedokie authored and denobot committed Jan 31, 2021
1 parent be3d2d2 commit cbedbd3
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion testing/diff.ts → 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 testing/diff_test.ts → 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 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 cbedbd3

Please sign in to comment.