-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from nkmr-jp/develop
Develop
- Loading branch information
Showing
6 changed files
with
42 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
const {toPascalCase} = require('./common'); | ||
|
||
test('converts normal string to pascal case', () => { | ||
expect(toPascalCase('hello world')).toBe('HelloWorld'); | ||
}); | ||
|
||
test('converts snake_case string to pascal case', () => { | ||
expect(toPascalCase('some_demo_string')).toBe('SomeDemoString'); | ||
}); | ||
|
||
test('converts kebab-case string to pascal case', () => { | ||
expect(toPascalCase('another-example string')).toBe('AnotherExampleString'); | ||
}); | ||
|
||
test('converts all uppercase string to pascal case', () => { | ||
expect(toPascalCase('ALLUPPERCASE')).toBe('Alluppercase'); | ||
}); | ||
|
||
test('converts all uppercase string to pascal case', () => { | ||
expect(toPascalCase('GET')).toBe('Get'); | ||
}); | ||
|
||
test('keeps camelCase string in pascal case', () => { | ||
expect(toPascalCase('camelCaseInput')).toBe('CamelCaseInput'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters