levenshtein
should be a function.
testString: assert(typeof levenshtein == 'function');
- text: levenshtein("mist", "dist")
should return a number.
testString: assert(typeof levenshtein("mist", "dist") == 'number');
- text: levenshtein("mist", "dist")
should return 1
.
testString: assert.equal(levenshtein("mist", "dist"), 1);
- text: levenshtein("tier", "tor")
should return 2
.
testString: assert.equal(levenshtein("tier", "tor"), 2);
- text: levenshtein("kitten", "sitting")
should return 3
.
testString: assert.equal(levenshtein("kitten", "sitting"), 3);
- text: levenshtein("stop", "tops")
should return 2
.
testString: assert.equal(levenshtein("stop", "tops"), 2);
- text: levenshtein("rosettacode", "raisethysword")
should return 8
.
testString: assert.equal(levenshtein("rosettacode", "raisethysword"), 8);
- text: levenshtein("mississippi", "swiss miss")
should return 8
.
testString: assert.equal(levenshtein("mississippi", "swiss miss"), 8);
```