From b7836122ffbc0e37fd3441125832d4c59d6f52cb Mon Sep 17 00:00:00 2001 From: Roland Hummel Date: Mon, 2 Oct 2023 09:13:37 +0200 Subject: [PATCH] fix: ValidateURL failing tests (#1394) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * test: remove ValidateUrl.test.js The code was removed with ecac786d but the test was left here (and has been failing since then, obviously 🤣) * test: remove conflicting test case There is another test case that explicitly expects the `null` result when the input array only contains one element. * Updated Documentation in README.md --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> --- Maths/test/ParityOutlier.test.js | 5 ----- String/test/ValidateUrl.test.js | 14 -------------- 2 files changed, 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 ed3307dcd..f4de9162b 100644 --- a/Maths/test/ParityOutlier.test.js +++ b/Maths/test/ParityOutlier.test.js @@ -9,11 +9,6 @@ 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) diff --git a/String/test/ValidateUrl.test.js b/String/test/ValidateUrl.test.js deleted file mode 100644 index e19e46e0f..000000000 --- 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) - }) -})