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) 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) - }) -})