You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
749 B

3 weeks ago
/* global describe,it */
var getSlug = require('../lib/speakingurl');
describe('getSlug maintainCase', function () {
'use strict';
it('should maintain case characters', function (done) {
getSlug('Foo, Bar Baz', {
maintainCase: true
})
.should.eql('Foo-Bar-Baz');
getSlug('Foo- Bar Baz', {
maintainCase: true
})
.should.eql('Foo-Bar-Baz');
getSlug('Foo] Bar Baz', {
maintainCase: true
})
.should.eql('Foo-Bar-Baz');
getSlug('Foo > Bar ♥ Baz', {
maintainCase: true
})
.should.eql('Foo-greater-than-Bar-love-Baz');
done();
});
});