From 71392bc8ef0b76673ad9656907eca8b27803b93c Mon Sep 17 00:00:00 2001 From: Ankush263 Date: Tue, 31 May 2022 11:50:00 +0530 Subject: [PATCH 1/3] Add test case to CheckPascalCase Algorithm --- String/test/CheckPascalCase.test.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 String/test/CheckPascalCase.test.js diff --git a/String/test/CheckPascalCase.test.js b/String/test/CheckPascalCase.test.js new file mode 100644 index 0000000000..640124c3bc --- /dev/null +++ b/String/test/CheckPascalCase.test.js @@ -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() +}) From 4e02808cdecc3a69bf973da1e03af183ead5a2b0 Mon Sep 17 00:00:00 2001 From: Ankush263 Date: Tue, 31 May 2022 12:05:47 +0530 Subject: [PATCH 2/3] Add test case to palindromeRearranging Algorithm --- 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 0000000000..df9f158ffc --- /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() +}) From 6062102b41011940fa5dca1ffd48b74883b46ced Mon Sep 17 00:00:00 2001 From: Ankush263 <86042508+Ankush263@users.noreply.github.com> Date: Tue, 31 May 2022 12:10:33 +0530 Subject: [PATCH 3/3] no need --- String/test/CheckPascalCase.test.js | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 String/test/CheckPascalCase.test.js diff --git a/String/test/CheckPascalCase.test.js b/String/test/CheckPascalCase.test.js deleted file mode 100644 index 640124c3bc..0000000000 --- a/String/test/CheckPascalCase.test.js +++ /dev/null @@ -1,19 +0,0 @@ -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() -})