Skip to content

Commit

Permalink
Add test for slugify and cleanDiacritics of œ and æ
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzzz committed Sep 13, 2017
1 parent 2f78f0d commit aad621d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/cleanDiacritics.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
var equal = require('assert').equal;
var cleanDiacritics = require('../cleanDiacritics');

var from = 'ąàáäâãåæăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșşšŝťțţŭùúüűûñÿýçżźž',
to = 'aaaaaaaaaccceeeeeghiiiijllnnoooooooossssstttuuuuuunyyczzz';
var from = 'ąàáäâãåăćčĉęèéëêĝĥìíïîĵłľńňòóöőôõðøśșşšŝťțţŭùúüűûñÿýçżźž',
to = 'aaaaaaaaccceeeeeghiiiijllnnoooooooossssstttuuuuuunyyczzz';

test('#cleanDiacritics', function() {

Expand All @@ -20,5 +20,7 @@ test('#cleanDiacritics', function() {

equal(cleanDiacritics('ß'), 'ss');
equal(cleanDiacritics('Schuß'), 'Schuss');
});

equal(cleanDiacritics('œuf'), 'oeuf');
equal(cleanDiacritics('curriculum vitæ'), 'curriculum vitae');
});
1 change: 1 addition & 0 deletions tests/slugify.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var slugify = require('../slugify');
test('#slugify', function() {
equal(slugify('Jack & Jill like numbers 1,2,3 and 4 and silly characters ?%.$!/'), 'jack-jill-like-numbers-1-2-3-and-4-and-silly-characters');
equal(slugify('Un éléphant à l\'orée du bois'), 'un-elephant-a-l-oree-du-bois');
equal(slugify('Un œuf et un curriculum vitæ'), 'un-oeuf-et-un-curriculum-vitae');
equal(slugify('I know latin characters: á í ó ú ç ã õ ñ ü ă ș ț'), 'i-know-latin-characters-a-i-o-u-c-a-o-n-u-a-s-t');
equal(slugify('I am a word too, even though I am but a single letter: i!'), 'i-am-a-word-too-even-though-i-am-but-a-single-letter-i');
equal(slugify('Some asian 天地人 characters'), 'some-asian-characters');
Expand Down

0 comments on commit aad621d

Please sign in to comment.