fix: make dasherize trim first
This commit is contained in:
committed by
mrugesh
parent
3dc4e5897d
commit
f159645810
@ -11,9 +11,11 @@ describe('dasherize', () => {
|
||||
expect(dasherize('UPPERCASE')).toBe('uppercase');
|
||||
});
|
||||
it('converts spaces to dashes', () => {
|
||||
expect(dasherize(' the space between ')).toBe(
|
||||
'--the-space--between----'
|
||||
);
|
||||
expect(dasherize('the space between')).toBe('the-space--between');
|
||||
});
|
||||
|
||||
it('trims off surrounding whitespace', () => {
|
||||
expect(dasherize(' the space between ')).toBe('the-space--between');
|
||||
});
|
||||
|
||||
it('removes everything except letters, numbers, - and .', () => {
|
||||
|
Reference in New Issue
Block a user