mirror of
https://github.com/denoland/deno
synced 2024-10-13 11:32:29 +00:00
refactor(std/testing): Get rid of default export and make std/testing/diff.ts private (#7592)
This commit is contained in:
parent
e077b93d77
commit
5590b97670
|
@ -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),
|
|
@ -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({
|
|
@ -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]";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue