mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 00:01:37 +08:00
merge: Add test case to palindromeRearranging Algorithm (#1030)
* Add test case to CheckPascalCase Algorithm * Add test case to palindromeRearranging Algorithm * no need
This commit is contained in:
25
String/test/CheckRearrangePalindrome.test.js
Normal file
25
String/test/CheckRearrangePalindrome.test.js
Normal file
@ -0,0 +1,25 @@
|
||||
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()
|
||||
})
|
Reference in New Issue
Block a user