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