From 162e90f3d2771bb6b3bd7de0447624589c3829b3 Mon Sep 17 00:00:00 2001 From: Ankush263 <86042508+Ankush263@users.noreply.github.com> Date: Tue, 31 May 2022 14:24:57 +0530 Subject: [PATCH] merge: Add test case to palindromeRearranging Algorithm (#1030) * Add test case to CheckPascalCase Algorithm * Add test case to palindromeRearranging Algorithm * no need --- String/test/CheckRearrangePalindrome.test.js | 25 ++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 String/test/CheckRearrangePalindrome.test.js diff --git a/String/test/CheckRearrangePalindrome.test.js b/String/test/CheckRearrangePalindrome.test.js new file mode 100644 index 000000000..df9f158ff --- /dev/null +++ b/String/test/CheckRearrangePalindrome.test.js @@ -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() +})