From 277f150318c32635a7b2def29ed4149857eeedde Mon Sep 17 00:00:00 2001 From: CarlosZoft Date: Sun, 1 Oct 2023 20:23:18 -0300 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=90=9B=20fix:=20fixing=20tests=20that?= =?UTF-8?q?=20are=20failing=20in=20the=20pipeline?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Maths/test/ParityOutlier.test.js | 7 ++----- String/test/ValidateUrl.test.js | 14 -------------- 2 files changed, 2 insertions(+), 19 deletions(-) delete mode 100644 String/test/ValidateUrl.test.js diff --git a/Maths/test/ParityOutlier.test.js b/Maths/test/ParityOutlier.test.js index ed3307dcd0..73b9159dc0 100644 --- a/Maths/test/ParityOutlier.test.js +++ b/Maths/test/ParityOutlier.test.js @@ -9,17 +9,14 @@ describe('Testing parityOutlier function', () => { expect(parityOutlier([177, 5, 76, 1919])).toBe(76) }) - it('should, if the given array has only one integer element, return the integer itself', () => { - expect(parityOutlier([83])).toBe(83) - expect(parityOutlier([54])).toBe(54) - }) - it('should, if the given array has only an odd and an even number, return the odd outlier', () => { expect(parityOutlier([1, 2])).toBe(1) expect(parityOutlier([4, 3])).toBe(3) }) it('should return null if the given array is empty, contains only one integer, contains non-interger elements or does not have a parity outlier', () => { + expect(parityOutlier([83])).toBe(null) + expect(parityOutlier([54])).toBe(null) expect(parityOutlier([])).toBe(null) expect(parityOutlier([2])).toBe(null) expect(parityOutlier([2, {}, 5, 'GitHub'])).toBe(null) diff --git a/String/test/ValidateUrl.test.js b/String/test/ValidateUrl.test.js deleted file mode 100644 index e19e46e0f5..0000000000 --- a/String/test/ValidateUrl.test.js +++ /dev/null @@ -1,14 +0,0 @@ -import { validateURL } from '../ValidateUrl' - -describe('ValidateUrl', () => { - it('expects to return false', () => { - expect(validateURL('google')).toEqual(false) - expect(validateURL('link: https://www.google.com')).toEqual(false) - }) - - it('expects to return true', () => { - expect(validateURL('http://www.google.com')).toEqual(true) - expect(validateURL('https://www.google.com')).toEqual(true) - expect(validateURL('www.google.com')).toEqual(true) - }) -}) From d0ed8ef1a85af1f4f56b25b9f52296bdfb666922 Mon Sep 17 00:00:00 2001 From: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> Date: Sun, 1 Oct 2023 23:23:50 +0000 Subject: [PATCH 2/2] Updated Documentation in README.md --- DIRECTORY.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/DIRECTORY.md b/DIRECTORY.md index 4f1c033352..2d70c5d6a2 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -9,10 +9,12 @@ * [SumOfSubset](Backtracking/SumOfSubset.js) * **Bit-Manipulation** * [BinaryCountSetBits](Bit-Manipulation/BinaryCountSetBits.js) + * [IsPowerofFour](Bit-Manipulation/IsPowerofFour.js) * [IsPowerOfTwo](Bit-Manipulation/IsPowerOfTwo.js) * [LogTwo](Bit-Manipulation/LogTwo.js) * [NextPowerOfTwo](Bit-Manipulation/NextPowerOfTwo.js) * [SetBit](Bit-Manipulation/SetBit.js) + * [UniqueElementInAnArray](Bit-Manipulation/UniqueElementInAnArray.js) * **Cache** * [LFUCache](Cache/LFUCache.js) * [LRUCache](Cache/LRUCache.js) @@ -270,6 +272,7 @@ * [Problem017](Project-Euler/Problem017.js) * [Problem018](Project-Euler/Problem018.js) * [Problem020](Project-Euler/Problem020.js) + * [Problem021](Project-Euler/Problem021.js) * [Problem023](Project-Euler/Problem023.js) * [Problem025](Project-Euler/Problem025.js) * [Problem028](Project-Euler/Problem028.js)