Content-Length: 282172 | pFad | http://github.com/JCarlosR/TheAlgorithms-JavaScript/commit/420471a44f4d69bc9e7781dc8a4f9e61b32b8b0b

E0 Add more descriptive titles · JCarlosR/TheAlgorithms-JavaScript@420471a · GitHub
Skip to content

Commit 420471a

Browse files
committed
Add more descriptive titles
1 parent cda424c commit 420471a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dynamic-Programming/tests/LevenshteinDistance.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
import { calculateLevenshteinDp } from '../LevenshteinDistance'
22

3-
test('Test Case 1', () => {
3+
test('Should return the distance counting additions and removals', () => {
44
const from = 'kitten'
55
const to = 'sitting'
66
expect(calculateLevenshteinDp(from, to)).toBe(3)
77
})
88

9-
test('Test Case 2', () => {
9+
test('Should return the distance based on replacements in the middle of the strings', () => {
1010
const from = 'book'
1111
const to = 'back'
1212
expect(calculateLevenshteinDp(from, to)).toBe(2)
1313
})
1414

15-
test('Test Case 3', () => {
15+
test('Should return the distance for strings with different length', () => {
1616
const from = 'sunday'
1717
const to = 'saturday'
1818
expect(calculateLevenshteinDp(from, to)).toBe(3)

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/JCarlosR/TheAlgorithms-JavaScript/commit/420471a44f4d69bc9e7781dc8a4f9e61b32b8b0b

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy