mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-07 02:05:08 +08:00

* Add test case to CheckPascalCase Algorithm * Add test case to palindromeRearranging Algorithm * no need
26 lines
697 B
JavaScript
26 lines
697 B
JavaScript
import { palindromeRearranging } from '../CheckRearrangePalindrome'
|
|
|
|
test('palindromeRearranging(apple) -> false', () => {
|
|
const word = 'apple'
|
|
const res = palindromeRearranging(word)
|
|
expect(res).toBeFalsy()
|
|
})
|
|
|
|
test('palindromeRearranging(aapplle) -> true', () => {
|
|
const word = 'aapplle'
|
|
const res = palindromeRearranging(word)
|
|
expect(res).toBeTruthy()
|
|
})
|
|
|
|
test('palindromeRearranging(value) -> false', () => {
|
|
const word = 'value'
|
|
const res = palindromeRearranging(word)
|
|
expect(res).toBeFalsy()
|
|
})
|
|
|
|
test('palindromeRearranging(aaeccrr) -> true', () => {
|
|
const word = 'aaeccrr'
|
|
const res = palindromeRearranging(word)
|
|
expect(res).toBeTruthy()
|
|
})
|