cc038a7372
NPM Installation / build (16.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (16.x, windows-latest) (push) Has been cancelled
NPM Installation / build (17.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (17.x, windows-latest) (push) Has been cancelled
NPM Installation / build (18.x, ubuntu-latest) (push) Has been cancelled
NPM Installation / build (18.x, windows-latest) (push) Has been cancelled
32 lines
749 B
JavaScript
32 lines
749 B
JavaScript
/* 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();
|
|
});
|
|
}); |