mirror of
https://github.com/denoland/std.git
synced 2024-11-22 04:59:05 +00:00
18 lines
440 B
TypeScript
18 lines
440 B
TypeScript
|
// Copyright 2018-2023 the Deno authors. All rights reserved. MIT license.
|
||
|
import { assertEquals } from "../assert/mod.ts";
|
||
|
import { levenshteinDistance } from "./mod.ts";
|
||
|
|
||
|
Deno.test("levenshteinDistanceAbove - basic cases", function () {
|
||
|
assertEquals(
|
||
|
levenshteinDistance("aa", "bb"),
|
||
|
2,
|
||
|
);
|
||
|
});
|
||
|
|
||
|
Deno.test("levenshteinDistance - same strings", function () {
|
||
|
assertEquals(
|
||
|
levenshteinDistance("aa", "aa"),
|
||
|
0,
|
||
|
);
|
||
|
});
|