Skip to content

Commit

Permalink
Add tests for #95
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed Mar 29, 2022
1 parent 497d7fc commit e527576
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import camelCase from '.';

test('camelCase', t => {
t.is(camelCase('foo'), 'foo');
/// https://github.com/sindresorhus/camelcase/issues/95
/// t.is(camelCase('IDs'), 'ids');
/// t.is(camelCase('FooIDs'), 'fooIds');
t.is(camelCase('foo-bar'), 'fooBar');
t.is(camelCase('foo-bar-baz'), 'fooBarBaz');
t.is(camelCase('foo--bar'), 'fooBar');
Expand Down Expand Up @@ -160,6 +163,9 @@ test('camelCase with preserveConsecutiveUppercase option', t => {
t.is(camelCase('РозовыйПушистыйFOOдинорогиf', {preserveConsecutiveUppercase: true}), 'розовыйПушистыйFOOдинорогиf');
t.is(camelCase('桑德在这里。', {preserveConsecutiveUppercase: true}), '桑德在这里。');
t.is(camelCase('桑德_在这里。', {preserveConsecutiveUppercase: true}), '桑德在这里。');
/// https://github.com/sindresorhus/camelcase/issues/95
/// t.is(camelCase('IDs', {preserveConsecutiveUppercase: true}), 'ids');
t.is(camelCase('FooIDs', {preserveConsecutiveUppercase: true}), 'fooIDs');
});

test('camelCase with both pascalCase and preserveConsecutiveUppercase option', t => {
Expand Down

0 comments on commit e527576

Please sign in to comment.