Skip to content

Commit

Permalink
added test for substitution option
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisumbel committed Mar 22, 2012
1 parent c879f11 commit b971150
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/levenshtein_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ describe('levenshtein_distance', function() {
expect(levenshteinDistance('doctor', 'doktor')).toBe(2);
});

it('should allow altering replacement value', function() {
expect(levenshteinDistance('doctor', 'doktor', {substitution_cost: 1})).toBe(1);
});

it('should insert 1', function() {
expect(levenshteinDistance('doctor', 'docto')).toBe(1);
});
Expand Down

0 comments on commit b971150

Please sign in to comment.