mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-04 15:39:42 +08:00
merge: Add test case to CheckPascalCase Algorithm (#1029)
This commit is contained in:
19
String/test/CheckPascalCase.test.js
Normal file
19
String/test/CheckPascalCase.test.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
import { CheckPascalCase } from '../CheckPascalCase'
|
||||||
|
|
||||||
|
test('CheckPascalCase(TheAlgorithms) -> true', () => {
|
||||||
|
const word = 'TheAlgorithms'
|
||||||
|
const res = CheckPascalCase(word)
|
||||||
|
expect(res).toBeTruthy()
|
||||||
|
})
|
||||||
|
|
||||||
|
test('CheckPascalCase(theAlgorithms) -> false', () => {
|
||||||
|
const word = 'theAlgorithms'
|
||||||
|
const res = CheckPascalCase(word)
|
||||||
|
expect(res).toBeFalsy()
|
||||||
|
})
|
||||||
|
|
||||||
|
test('CheckPascalCase(The Algorithms) -> false', () => {
|
||||||
|
const word = 'The Algorithms'
|
||||||
|
const res = CheckPascalCase(word)
|
||||||
|
expect(res).toBeFalsy()
|
||||||
|
})
|
Reference in New Issue
Block a user