WXL
2025-12-19 da459f4addc08dede5b91f1f4e87e6c1c6d3c88e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/* 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();
    });
});