mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 08:16:50 +08:00
fix: ValidateURL failing tests (#1394)
* 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>
This commit is contained in:
@ -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)
|
||||
|
@ -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)
|
||||
})
|
||||
})
|
Reference in New Issue
Block a user