From 57ff7b5474fb61280df951ce93a1bfdfa1480b82 Mon Sep 17 00:00:00 2001 From: Henry Szeto Date: Fri, 13 Jul 2018 11:02:11 -0700 Subject: [PATCH] fix issues reported by Codacy --- test/dig/dig.js | 10 +- test/dig/dig.test.js | 22 +- test/testlog | 2077 ------------------------------------------ 3 files changed, 18 insertions(+), 2091 deletions(-) delete mode 100644 test/testlog diff --git a/test/dig/dig.js b/test/dig/dig.js index 8ee35822a..db996762f 100644 --- a/test/dig/dig.js +++ b/test/dig/dig.js @@ -4,8 +4,12 @@ const dig = (obj, target) => : Object .values(obj) .reduce((acc, val) => { - if (acc !== undefined) return acc; - if (typeof val === 'object') return dig(val, target); + if (acc !== undefined) { + return acc + }; + if (typeof val === "object") { + return dig(val, target) + }; }, undefined); -module.exports = dig; \ No newline at end of file +module.exports = dig; diff --git a/test/dig/dig.test.js b/test/dig/dig.test.js index d66391806..280272dce 100644 --- a/test/dig/dig.test.js +++ b/test/dig/dig.test.js @@ -1,5 +1,5 @@ -const expect = require('expect'); -const dig = require('./dig.js'); +const expect = require("expect"); +const dig = require("./dig.js"); const data = { level1:{ @@ -11,22 +11,22 @@ const data = { } }; -test('dig is a Function', () => { +test("dig is a Function", () => { expect(dig).toBeInstanceOf(Function); }); -test('Dig target success', () => { - expect(dig(data, 'level3')).toEqual('some data'); +test("Dig target success", () => { + expect(dig(data, "level3")).toEqual("some data"); }); -test('Dig target with falsey value', () => { - expect(dig(data, 'level3f')).toEqual(false); +test("Dig target with falsey value", () => { + expect(dig(data, "level3f")).toEqual(false); }); -test('Dig target with array', () => { - expect(dig(data, 'level3a')).toEqual([1,2,3,4]); +test("Dig target with array", () => { + expect(dig(data, "level3a")).toEqual([1,2,3,4]); }); -test('Unknown target return undefined', () => { - expect(dig(data, 'level4')).toEqual(undefined); +test("Unknown target return undefined", () => { + expect(dig(data, "level4")).toEqual(undefined); }); diff --git a/test/testlog b/test/testlog deleted file mode 100644 index f151b8630..000000000 --- a/test/testlog +++ /dev/null @@ -1,2077 +0,0 @@ - - -# Starting... -# 340 test suites found. - -# PASS test/isValidJSON/isValidJSON.test.js - -ok 1 — isValidJSON is a Function -ok 2 — {"name":"Adam","age":20} is a valid JSON -ok 3 — {"name":"Adam",age:"20"} is not a valid JSON -ok 4 — null is a valid JSON - -# PASS test/toKebabCase/toKebabCase.test.js - -ok 5 — toKebabCase is a Function -ok 6 — toKebabCase('camelCase') returns camel-case -ok 7 — toKebabCase('some text') returns some-text -ok 8 — toKebabCase('some-mixed-string With spaces-underscores-and-hyphens') returns some-mixed-string-with-spaces-underscores-and-hyphens -ok 9 — toKebabCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i-am-listening-to-fm-while-loading-different-url-on-my-browser-and-also-editing-some-xml-and-html -ok 10 — toKebabCase() returns undefined -ok 11 — toKebabCase([]) throws an erro -ok 12 — toKebabCase({}) throws an erro -ok 13 — toKebabCase(123) throws an erro -ok 14 — toKebabCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run - -# PASS test/toCurrency/toCurrency.test.js - -ok 15 — toCurrency is a Function -ok 16 — currency: Euro | currencyLangFormat: Local -ok 17 — currency: US Dollar | currencyLangFormat: English (United States) -ok 18 — currency: Japanese Yen | currencyLangFormat: Local - -# PASS test/is/is.test.js - -ok 19 — is is a Function -ok 20 — Works for arrays with data -ok 21 — Works for empty arrays -ok 22 — Works for arrays, not objects -ok 23 — Works for objects -ok 24 — Works for maps -ok 25 — Works for regular expressions -ok 26 — Works for sets -ok 27 — Works for weak maps -ok 28 — Works for weak sets -ok 29 — Works for strings - returns true for primitive -ok 30 — Works for strings - returns true when using constructor -ok 31 — Works for numbers - returns true for primitive -ok 32 — Works for numbers - returns true when using constructor -ok 33 — Works for booleans - returns true for primitive -ok 34 — Works for booleans - returns true when using constructor -ok 35 — Works for functions - -# PASS test/average/average.test.js - -ok 36 — average is a Function -ok 37 — average(true) returns 0 -ok 38 — average(false) returns 1 -ok 39 — average(9, 1) returns 5 -ok 40 — average(153, 44, 55, 64, 71, 1122, 322774, 2232, 23423, 234, 3631) returns 32163.909090909092 -ok 41 — average(1, 2, 3) returns 2 -ok 42 — average(null) returns 0 -ok 43 — average(1, 2, 3) returns NaN -ok 44 — average(String) returns NaN -ok 45 — average({ a: 123}) returns NaN -ok 46 — average([undefined, 0, string]) returns NaN -ok 47 — average([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run - -# FAIL test/tomorrow/tomorrow.test.js - -ok 48 — tomorrow is a Function -ok 49 — Returns the correct year -ok 50 — Returns the correct month -not ok 51 ● Returns the correct date -# -# expect(received).toBe(expected) // Object.is equality -# -# -# Expected: 8 -# -# Received: -# -# Stack: -# -# at Object..test (test/tomorrow/tomorrow.test.js:16:24) -# -# 12 | test('Returns the correct month', () => { -# 13 | expect(t1.getMonth()).toBe(t2.getMonth()); -# 14 | }); -# 15 | test('Returns the correct date', () => { -# > 16 | expect(t1.getDate()).toBe(t2.getDate()); -# | ^ -# 17 | }); -# 18 | -# -# at new Promise () -# at - -# PASS test/validateNumber/validateNumber.test.js - -ok 52 — validateNumber is a Function -ok 53 — validateNumber(9) returns true -ok 54 — validateNumber(234asd.slice(0, 2)) returns true -ok 55 — validateNumber(1232) returns true -ok 56 — validateNumber(1232 + 13423) returns true -ok 57 — validateNumber(1232 * 2342 * 123) returns true -ok 58 — validateNumber(1232.23423536) returns true -ok 59 — validateNumber(234asd) returns false -ok 60 — validateNumber(e234d) returns false -ok 61 — validateNumber(false) returns false -ok 62 — validateNumber(true) returns false -ok 63 — validateNumber(null) returns false -ok 64 — validateNumber(123 * asd) returns false - -# PASS test/countBy/countBy.test.js - -ok 65 — countBy is a Function -ok 66 — Works for functions -ok 67 — Works for property names - -# PASS test/collatz/collatz.test.js - -ok 68 — collatz is a Function -ok 69 — When n is even, divide by 2 -ok 70 — When n is odd, times by 3 and add 1 -ok 71 — Eventually reaches 1 - -# PASS test/chunk/chunk.test.js - -ok 72 — chunk is a Function -ok 73 — chunk([1, 2, 3, 4, 5], 2) returns [[1,2],[3,4],[5]] -ok 74 — chunk([]) returns [] -ok 75 — chunk(123) returns [] -ok 76 — chunk({ a: 123}) returns [] -ok 77 — chunk(string, 2) returns [ st, ri, ng ] -ok 78 — chunk() throws an error -ok 79 — chunk(undefined) throws an error -ok 80 — chunk(null) throws an error -ok 81 — chunk(This is a string, 2) takes less than 2s to run - -# PASS test/zipObject/zipObject.test.js - -ok 82 — zipObject is a Function -ok 83 — zipObject([a, b, c], [1, 2]) returns {a: 1, b: 2, c: undefined} -ok 84 — zipObject([a, b], [1, 2, 3]) returns {a: 1, b: 2} -ok 85 — zipObject([a, b, c], string) returns { a: s, b: t, c: r } -ok 86 — zipObject([a], string) returns { a: s } -ok 87 — zipObject() throws an error -ok 88 — zipObject((['string'], null) throws an error -ok 89 — zipObject(null, [1]) throws an error -ok 90 — zipObject('string') throws an error -ok 91 — zipObject('test', 'string') throws an error - -# PASS test/toSafeInteger/toSafeInteger.test.js - -ok 92 — toSafeInteger is a Function -ok 93 — Number(toSafeInteger(3.2)) is a number -ok 94 — Converts a value to a safe integer -ok 95 — toSafeInteger('4.2') returns 4 -ok 96 — toSafeInteger(4.6) returns 5 -ok 97 — toSafeInteger([]) returns 0 -ok 98 — isNaN(toSafeInteger([1.5, 3124])) is true -ok 99 — isNaN(toSafeInteger('string')) is true -ok 100 — isNaN(toSafeInteger({})) is true -ok 101 — isNaN(toSafeInteger()) is true -ok 102 — toSafeInteger(Infinity) returns 9007199254740991 -ok 103 — toSafeInteger(3.2) takes less than 2s to run - -# PASS test/off/off.test.js - -ok 104 — off is a Function - -# PASS test/CSVToJSON/CSVToJSON.test.js - -ok 105 — CSVToJSON is a Function -ok 106 — CSVToJSON works with default delimiter -ok 107 — CSVToJSON works with custom delimiter - -# PASS test/pipeFunctions/pipeFunctions.test.js - -ok 108 — pipeFunctions is a Function -ok 109 — Performs left-to-right function composition - -# PASS test/mapKeys/mapKeys.test.js - -ok 110 — mapKeys is a Function -ok 111 — Maps keys - -# PASS test/size/size.test.js - -ok 112 — size is a Function -ok 113 — Get size of arrays, objects or strings. -ok 114 — Get size of arrays, objects or strings. - -# PASS test/stringPermutations/stringPermutations.test.js - -ok 115 — stringPermutations is a Function -ok 116 — Generates all stringPermutations of a string -ok 117 — Works for single-letter strings -ok 118 — Works for empty strings - -# PASS test/escapeHTML/escapeHTML.test.js - -ok 119 — escapeHTML is a Function -ok 120 — Escapes a string for use in HTML - -# PASS test/gcd/gcd.test.js - -ok 121 — gcd is a Function -ok 122 — Calculates the greatest common divisor between two or more numbers/arrays -ok 123 — Calculates the greatest common divisor between two or more numbers/arrays - -# PASS test/uniqueElements/uniqueElements.test.js - -ok 124 — uniqueElements is a Function -ok 125 — uniqueElements([1, 2, 2, 3, 4, 4, 5]) returns [1,2,3,4,5] -ok 126 — uniqueElements([1, 23, 53]) returns [1, 23, 53] -ok 127 — uniqueElements([true, 0, 1, false, false, undefined, null, '']) returns [true, 0, 1, false, false, undefined, null, ''] -ok 128 — uniqueElements() returns [] -ok 129 — uniqueElements(null) returns [] -ok 130 — uniqueElements(undefined) returns [] -ok 131 — uniqueElements('strt') returns ['s', 't', 'r'] -ok 132 — uniqueElements(1, 1, 2543, 534, 5) throws an error -ok 133 — uniqueElements({}) throws an error -ok 134 — uniqueElements(true) throws an error -ok 135 — uniqueElements(false) throws an error -ok 136 — uniqueElements([true, 0, 1, false, false, undefined, null]) takes less than 2s to run - -# PASS test/matches/matches.test.js - -ok 137 — matches is a Function -ok 138 — Matches returns true for two similar objects -ok 139 — Matches returns false for two non-similar objects - -# PASS test/factors/factors.test.js - -ok 140 — factors is a Function - -# PASS test/permutations/permutations.test.js - -ok 141 — permutations is a Function -ok 142 — Generates all permutations of an array - -# PASS test/pullBy/pullBy.test.js - -ok 143 — pullBy is a Function -ok 144 — Pulls the specified values - -# PASS test/zip/zip.test.js - -ok 145 — zip is a Function -ok 146 — zip([a, b], [1, 2], [true, false]) returns [[a, 1, true], [b, 2, false]] -ok 147 — zip([a], [1, 2], [true, false]) returns [[a, 1, true], [undefined, 2, false]] -ok 148 — zip([]) returns [] -ok 149 — zip(123) returns [] -ok 150 — zip([a, b], [1, 2], [true, false]) returns an Array -ok 151 — zip([a], [1, 2], [true, false]) returns an Array -ok 152 — zip(null) throws an error -ok 153 — zip(undefined) throws an error - -# PASS test/removeNonASCII/removeNonASCII.test.js - -ok 154 — removeNonASCII is a Function -ok 155 — Removes non-ASCII characters - -# PASS test/round/round.test.js - -ok 156 — round is a Function -ok 157 — round(1.005, 2) returns 1.01 -ok 158 — round(123.3423345345345345344, 11) returns 123.34233453453 -ok 159 — round(3.342, 11) returns 3.342 -ok 160 — round(1.005) returns 1 -ok 161 — round([1.005, 2]) returns NaN -ok 162 — round(string) returns NaN -ok 163 — round() returns NaN -ok 164 — round(132, 413, 4134) returns NaN -ok 165 — round({a: 132}, 413) returns NaN -ok 166 — round(123.3423345345345345344, 11) takes less than 2s to run - -# PASS test/partition/partition.test.js - -ok 167 — partition is a Function -ok 168 — Groups the elements into two arrays, depending on the provided function's truthiness for each element. - -# PASS test/nthElement/nthElement.test.js - -ok 169 — nthElement is a Function -ok 170 — Returns the nth element of an array. -ok 171 — Returns the nth element of an array. - -# PASS test/powerset/powerset.test.js - -ok 172 — powerset is a Function -ok 173 — Returns the powerset of a given array of numbers. - -# PASS test/spreadOver/spreadOver.test.js - -ok 174 — spreadOver is a Function -ok 175 — Takes a variadic function and returns a closure that accepts an array of arguments to map to the inputs of the function. - -# PASS test/counter/counter.test.js - -ok 176 — counter is a Function - -# PASS test/initialize2DArray/initialize2DArray.test.js - -ok 177 — initialize2DArray is a Function -ok 178 — Initializes a 2D array of given width and height and value - -# PASS test/words/words.test.js - -ok 179 — words is a Function -ok 180 — words('I love javaScript!!') returns [I, love, javaScript] -ok 181 — words('python, javaScript & coffee') returns [python, javaScript, coffee] -ok 182 — words(I love javaScript!!) returns an array -ok 183 — words() throws an error -ok 184 — words(null) throws an error -ok 185 — words(undefined) throws an error -ok 186 — words({}) throws an error -ok 187 — words([]) throws an error -ok 188 — words(1234) throws an error - -# PASS test/hz/hz.test.js - -ok 189 — hz is a Function - -# PASS test/isSymbol/isSymbol.test.js - -ok 190 — isSymbol is a Function -ok 191 — Checks if the given argument is a symbol - -# PASS test/sortedIndex/sortedIndex.test.js - -ok 192 — sortedIndex is a Function -ok 193 — Returns the lowest index at which value should be inserted into array in order to maintain its sort order. -ok 194 — Returns the lowest index at which value should be inserted into array in order to maintain its sort order. - -# PASS test/timeTaken/timeTaken.test.js - -ok 195 — timeTaken is a Function - -# PASS test/prettyBytes/prettyBytes.test.js - -ok 196 — prettyBytes is a Function -ok 197 — Converts a number in bytes to a human-readable string. -ok 198 — Converts a number in bytes to a human-readable string. -ok 199 — Converts a number in bytes to a human-readable string. - -# PASS test/sample/sample.test.js - -ok 200 — sample is a Function -ok 201 — Returns a random element from the array -ok 202 — Works for single-element arrays -ok 203 — Returns undefined for empty array - -# PASS test/isAbsoluteURL/isAbsoluteURL.test.js - -ok 204 — isAbsoluteURL is a Function -ok 205 — Given string is an absolute URL -ok 206 — Given string is an absolute URL -ok 207 — Given string is not an absolute URL - -# PASS test/dropRight/dropRight.test.js - -ok 208 — dropRight is a Function -ok 209 — Returns a new array with n elements removed from the right -ok 210 — Returns a new array with n elements removed from the right -ok 211 — Returns a new array with n elements removed from the right - -# PASS test/isPrime/isPrime.test.js - -ok 212 — isPrime is a Function -ok 213 — passed number is a prime - -# PASS test/factorial/factorial.test.js - -ok 214 — factorial is a Function -ok 215 — Calculates the factorial of 720 -ok 216 — Calculates the factorial of 0 -ok 217 — Calculates the factorial of 1 -ok 218 — Calculates the factorial of 4 -ok 219 — Calculates the factorial of 10 - -# PASS test/toCamelCase/toCamelCase.test.js - -ok 220 — toCamelCase is a Function -ok 221 — toCamelCase('some_database_field_name') returns someDatabaseFieldName -ok 222 — toCamelCase('Some label that needs to be camelized') returns someLabelThatNeedsToBeCamelized -ok 223 — toCamelCase('some-javascript-property') return someJavascriptProperty -ok 224 — toCamelCase('some-mixed_string with spaces_underscores-and-hyphens') returns someMixedStringWithSpacesUnderscoresAndHyphens -ok 225 — toCamelCase() throws a error -ok 226 — toCamelCase([]) throws a error -ok 227 — toCamelCase({}) throws a error -ok 228 — toCamelCase(123) throws a error -ok 229 — toCamelCase(some-mixed_string with spaces_underscores-and-hyphens) takes less than 2s to run - -# PASS test/sampleSize/sampleSize.test.js - -ok 230 — sampleSize is a Function -ok 231 — Returns a single element without n specified -ok 232 — Returns a random sample of specified size from an array -ok 233 — Returns all elements in an array if n >= length -ok 234 — Returns an empty array if original array is empty -ok 235 — Returns an empty array if n = 0 - -# PASS test/composeRight/composeRight.test.js - -ok 236 — composeRight is a Function -ok 237 — Performs left-to-right function composition - -# PASS test/binarySearch/binarySearch.test.js - -ok 238 — binarySearch is a Function -ok 239 — Finds item in array -ok 240 — Returns -1 when not found -ok 241 — Works with empty arrays -ok 242 — Works for one element arrays - -# PASS test/binomialCoefficient/binomialCoefficient.test.js - -ok 243 — binomialCoefficient is a Function -ok 244 — Returns the appropriate value -ok 245 — Returns the appropriate value -ok 246 — Returns the appropriate value -ok 247 — Returns NaN -ok 248 — Returns NaN - -# PASS test/isObject/isObject.test.js - -ok 249 — isObject is a Function -ok 250 — isObject([1, 2, 3, 4]) is a object -ok 251 — isObject([]) is a object -ok 252 — isObject({ a:1 }) is a object -ok 253 — isObject(true) is not a object - -# PASS test/transform/transform.test.js - -ok 254 — transform is a Function -ok 255 — Transforms an object - -# PASS test/toSnakeCase/toSnakeCase.test.js - -ok 256 — toSnakeCase is a Function -ok 257 — toSnakeCase('camelCase') returns camel_case -ok 258 — toSnakeCase('some text') returns some_text -ok 259 — toSnakeCase('some-mixed_string With spaces_underscores-and-hyphens') returns some_mixed_string_with_spaces_underscores_and_hyphens -ok 260 — toSnakeCase('IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML') returns i_am_listening_to_fm_while_loading_different_url_on_my_browser_and_also_editing_some_xml_and_html -ok 261 — toSnakeCase() returns undefined -ok 262 — toSnakeCase([]) throws an error -ok 263 — toSnakeCase({}) throws an error -ok 264 — toSnakeCase(123) throws an error -ok 265 — toSnakeCase(IAmListeningToFMWhileLoadingDifferentURLOnMyBrowserAndAlsoEditingSomeXMLAndHTML) takes less than 2s to run - -# PASS test/getStyle/getStyle.test.js - -ok 266 — getStyle is a Function - -# PASS test/inRange/inRange.test.js - -ok 267 — inRange is a Function -ok 268 — The given number falls within the given range -ok 269 — The given number falls within the given range -ok 270 — The given number does not falls within the given range -ok 271 — The given number does not falls within the given range - -# PASS test/toDecimalMark/toDecimalMark.test.js - -ok 272 — toDecimalMark is a Function -ok 273 — convert a float-point arithmetic to the Decimal mark form - -# PASS test/last/last.test.js - -ok 274 — last is a Function -ok 275 — last({ a: 1234}) returns undefined -ok 276 — last([1, 2, 3]) returns 3 -ok 277 — last({ 0: false}) returns undefined -ok 278 — last(String) returns g -ok 279 — last(null) throws an Error -ok 280 — last(undefined) throws an Error -ok 281 — last() throws an Error -ok 282 — last([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run - -# PASS test/rearg/rearg.test.js - -ok 283 — rearg is a Function -ok 284 — Reorders arguments in invoked function - -# PASS test/compose/compose.test.js - -ok 285 — compose is a Function -ok 286 — Performs right-to-left function composition - -# PASS test/castArray/castArray.test.js - -ok 287 — castArray is a Function -ok 288 — Works for single values -ok 289 — Works for arrays with one value -ok 290 — Works for arrays with multiple value -ok 291 — Works for strings -ok 292 — Works for objects - -# PASS test/union/union.test.js - -ok 293 — union is a Function -ok 294 — union([1, 2, 3], [4, 3, 2]) returns [1, 2, 3, 4] -ok 295 — union('str', 'asd') returns [ 's', 't', 'r', 'a', 'd' ] -ok 296 — union([[], {}], [1, 2, 3]) returns [[], {}, 1, 2, 3] -ok 297 — union([], []) returns [] -ok 298 — union() throws an error -ok 299 — union(true, 'str') throws an error -ok 300 — union('false', true) throws an error -ok 301 — union((123, {}) throws an error -ok 302 — union([], {}) throws an error -ok 303 — union(undefined, null) throws an error -ok 304 — union([1, 2, 3], [4, 3, 2]) takes less than 2s to run - -# PASS test/isBoolean/isBoolean.test.js - -ok 305 — isBoolean is a Function -ok 306 — passed value is not a boolean -ok 307 — passed value is not a boolean - -# PASS test/httpsRedirect/httpsRedirect.test.js - -ok 308 — httpsRedirect is a Function - -# PASS test/mostPerformant/mostPerformant.test.js - -ok 309 — mostPerformant is a Function - -# PASS test/unflattenObject/unflattenObject.test.js - -ok 310 — unflattenObject is a Function -ok 311 — Unflattens an object with the paths for keys - -# PASS test/all/all.test.js - -ok 312 — all is a Function -ok 313 — Returns true for arrays with no falsey values -ok 314 — Returns false for arrays with 0 -ok 315 — Returns false for arrays with NaN -ok 316 — Returns false for arrays with undefined -ok 317 — Returns false for arrays with null -ok 318 — Returns false for arrays with empty strings -ok 319 — Returns true with predicate function -ok 320 — Returns false with a predicate function - -# PASS test/takeWhile/takeWhile.test.js - -ok 321 — takeWhile is a Function -ok 322 — Removes elements until the function returns true - -# PASS test/JSONtoCSV/JSONtoCSV.test.js - -ok 323 — JSONtoCSV is a Function -ok 324 — JSONtoCSV works with default delimiter -ok 325 — JSONtoCSV works with custom delimiter - -# PASS test/isSorted/isSorted.test.js - -ok 326 — isSorted is a Function -ok 327 — Array is sorted in ascending order -ok 328 — Array is sorted in ascending order -ok 329 — Array is sorted in ascending order -ok 330 — Array is sorted in ascending order -ok 331 — Array is sorted in descending order -ok 332 — Array is sorted in descending order -ok 333 — Array is sorted in descending order -ok 334 — Array is sorted in descending order -ok 335 — Array is empty -ok 336 — Array is not sorted, direction changed in array -ok 337 — Array is not sorted, direction changed in array - -# PASS test/isAnagram/isAnagram.test.js - -ok 338 — isAnagram is a Function -ok 339 — Checks valid anagram -ok 340 — Works with spaces -ok 341 — Ignores case -ok 342 — Ignores special characters - -# PASS test/indexOfAll/indexOfAll.test.js - -ok 343 — indexOfAll is a Function -ok 344 — Returns all indices of val in an array -ok 345 — Returns all indices of val in an array - -# PASS test/difference/difference.test.js - -ok 346 — difference is a Function -ok 347 — Returns the difference between two arrays - -# PASS test/percentile/percentile.test.js - -ok 348 — percentile is a Function -ok 349 — Uses the percentile formula to calculate how many numbers in the given array are less or equal to the given value. - -# PASS test/yesNo/yesNo.test.js - -ok 350 — yesNo is a Function -ok 351 — yesNo(Y) returns true -ok 352 — yesNo(yes) returns true -ok 353 — yesNo(foo, true) returns true -ok 354 — yesNo(No) returns false -ok 355 — yesNo() returns false -ok 356 — yesNo(null) returns false -ok 357 — yesNo(undefined) returns false -ok 358 — yesNo([123, null]) returns false -ok 359 — yesNo([Yes, No]) returns false -ok 360 — yesNo({ 2: Yes }) returns false -ok 361 — yesNo([Yes, No], true) returns true -ok 362 — yesNo({ 2: Yes }, true) returns true - -# PASS test/reverseString/reverseString.test.js - -ok 363 — reverseString is a Function -ok 364 — Reverses a string. - -# PASS test/httpPost/httpPost.test.js - -ok 365 — httpPost is a Function - -# PASS test/isNull/isNull.test.js - -ok 366 — isNull is a Function -ok 367 — passed argument is a null -ok 368 — passed argument is a null - -# PASS test/isUpperCase/isUpperCase.test.js - -ok 369 — isUpperCase is a Function -ok 370 — ABC is all upper case -ok 371 — abc is not all upper case -ok 372 — A3@$ is all uppercase - -# PASS test/distance/distance.test.js - -ok 373 — distance is a Function -ok 374 — Calculates the distance between two points - -# PASS test/elo/elo.test.js - -ok 375 — elo is a Function -ok 376 — Standard 1v1s -ok 377 — Standard 1v1s -ok 378 — 4 player FFA, all same rank - -# PASS test/sortedLastIndexBy/sortedLastIndexBy.test.js - -ok 379 — sortedLastIndexBy is a Function -ok 380 — Returns the highest index to insert the element without messing up the list order - -# PASS test/quickSort/quickSort.test.js - -ok 381 — quickSort is a Function -ok 382 — quickSort([5, 6, 4, 3, 1, 2]) returns [1, 2, 3, 4, 5, 6] -ok 383 — quickSort([-1, 0, -2]) returns [-2, -1, 0] -ok 384 — quickSort() throws an error -ok 385 — quickSort(123) throws an error -ok 386 — quickSort({ 234: string}) throws an error -ok 387 — quickSort(null) throws an error -ok 388 — quickSort(undefined) throws an error -ok 389 — quickSort([11, 1, 324, 23232, -1, 53, 2, 524, 32, 13, 156, 133, 62, 12, 4]) takes less than 2s to run - -# PASS test/runPromisesInSeries/runPromisesInSeries.test.js - -ok 390 — runPromisesInSeries is a Function -ok 391 — Runs promises in series - -# PASS test/everyNth/everyNth.test.js - -ok 392 — everyNth is a Function -ok 393 — Returns every nth element in an array - -# PASS test/tail/tail.test.js - -ok 394 — tail is a Function -ok 395 — Returns tail -ok 396 — Returns tail - -# PASS test/fromCamelCase/fromCamelCase.test.js - -ok 397 — fromCamelCase is a Function -ok 398 — Converts a string from camelcase -ok 399 — Converts a string from camelcase -ok 400 — Converts a string from camelcase - -# PASS test/randomHexColorCode/randomHexColorCode.test.js - -ok 401 — randomHexColorCode is a Function -ok 402 — randomHexColorCode has to proper length -ok 403 — The color code starts with "#" -ok 404 — The color code contains only valid hex-digits - -# PASS test/head/head.test.js - -ok 405 — head is a Function -ok 406 — head({ a: 1234}) returns undefined -ok 407 — head([1, 2, 3]) returns 1 -ok 408 — head({ 0: false}) returns false -ok 409 — head(String) returns S -ok 410 — head(null) throws an Error -ok 411 — head(undefined) throws an Error -ok 412 — head() throws an Error -ok 413 — head([1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 1122, 32124, 23232]) takes less than 2s to run - -# PASS test/digitize/digitize.test.js - -ok 414 — digitize is a Function -ok 415 — Converts a number to an array of digits - -# PASS test/initializeNDArray/initializeNDArray.test.js - -ok 416 — initializeNDArray is a Function - -# PASS test/untildify/untildify.test.js - -ok 417 — untildify is a Function -ok 418 — Contains no tildes -ok 419 — Does not alter the rest of the path -ok 420 — Does not alter paths without tildes - -# PASS test/on/on.test.js - -ok 421 — on is a Function - -# PASS test/mapObject/mapObject.test.js - -ok 422 — mapObject is a Function -ok 423 — mapObject([1, 2, 3], a => a * a) returns { 1: 1, 2: 4, 3: 9 } -ok 424 — mapObject([1, 2, 3, 4], (a, b) => b - a) returns { 1: -1, 2: -1, 3: -1, 4: -1 } -ok 425 — mapObject([1, 2, 3, 4], (a, b) => a - b) returns { 1: 1, 2: 1, 3: 1, 4: 1 } - -# PASS test/atob/atob.test.js - -ok 426 — atob is a Function -ok 427 — atob("Zm9vYmFy") equals "foobar" -ok 428 — atob("Z") returns "" - -# PASS test/flattenObject/flattenObject.test.js - -ok 429 — flattenObject is a Function -ok 430 — Flattens an object with the paths for keys -ok 431 — Works with arrays - -# PASS test/once/once.test.js - -ok 432 — once is a Function - -# PASS test/nest/nest.test.js - -ok 433 — nest is a Function - -# PASS test/smoothScroll/smoothScroll.test.js - -ok 434 — smoothScroll is a Function - -# PASS test/reducedFilter/reducedFilter.test.js - -ok 435 — reducedFilter is a Function -ok 436 — Filter an array of objects based on a condition while also filtering out unspecified keys. - -# PASS test/invertKeyValues/invertKeyValues.test.js - -ok 437 — invertKeyValues is a Function -ok 438 — invertKeyValues({ a: 1, b: 2, c: 1 }) returns { 1: [ 'a', 'c' ], 2: [ 'b' ] } -ok 439 — invertKeyValues({ a: 1, b: 2, c: 1 }, value => 'group' + value) returns { group1: [ 'a', 'c' ], group2: [ 'b' ] } - -# PASS test/matchesWith/matchesWith.test.js - -ok 440 — matchesWith is a Function -ok 441 — Returns true for two objects with similar values, based on the provided function - -# PASS test/unionWith/unionWith.test.js - -ok 442 — unionWith is a Function -ok 443 — Produces the appropriate results - -# PASS test/splitLines/splitLines.test.js - -ok 444 — splitLines is a Function -ok 445 — Splits a multiline string into an array of lines. - -# PASS test/remove/remove.test.js - -ok 446 — remove is a Function -ok 447 — Removes elements from an array for which the given function returns false - -# PASS test/getURLParameters/getURLParameters.test.js - -ok 448 — getURLParameters is a Function -ok 449 — Returns an object containing the parameters of the current URL - -# PASS test/median/median.test.js - -ok 450 — median is a Function -ok 451 — Returns the median of an array of numbers -ok 452 — Returns the median of an array of numbers - -# PASS test/join/join.test.js - -ok 453 — join is a Function -ok 454 — Joins all elements of an array into a string and returns this string -ok 455 — Joins all elements of an array into a string and returns this string -ok 456 — Joins all elements of an array into a string and returns this string - -# PASS test/luhnCheck/luhnCheck.test.js - -ok 457 — luhnCheck is a Function -ok 458 — validates identification number -ok 459 — validates identification number -ok 460 — validates identification number - -# PASS test/isNil/isNil.test.js - -ok 461 — isNil is a Function -ok 462 — Returns true for null -ok 463 — Returns true for undefined -ok 464 — Returns false for an empty string - -# PASS test/isPromiseLike/isPromiseLike.test.js - -ok 465 — isPromiseLike is a Function -ok 466 — Returns true for a promise-like object -ok 467 — Returns false for an empty object - -# PASS test/differenceBy/differenceBy.test.js - -ok 468 — differenceBy is a Function -ok 469 — Works using a native function and numbers -ok 470 — Works with arrow function and objects - -# PASS test/randomIntegerInRange/randomIntegerInRange.test.js - -ok 471 — randomIntegerInRange is a Function -ok 472 — The returned value is an integer -ok 473 — The returned value lies between provided lowerLimit and upperLimit (both inclusive). - -# PASS test/symmetricDifferenceBy/symmetricDifferenceBy.test.js - -ok 474 — symmetricDifferenceBy is a Function -ok 475 — Returns the symmetric difference between two arrays, after applying the provided function to each array element of both - -# PASS test/unary/unary.test.js - -ok 476 — unary is a Function -ok 477 — Discards arguments after the first one - -# PASS test/coalesce/coalesce.test.js - -ok 478 — coalesce is a Function -ok 479 — Returns the first non-null/undefined argument - -# PASS test/insertBefore/insertBefore.test.js - -ok 480 — insertBefore is a Function - -# PASS test/isArray/isArray.test.js - -ok 481 — isArray is a Function -ok 482 — passed value is an array -ok 483 — passed value is not an array - -# PASS test/longestItem/longestItem.test.js - -ok 484 — longestItem is a Function -ok 485 — Returns the longest object - -# PASS test/xProd/xProd.test.js - -ok 486 — xProd is a Function -ok 487 — xProd([1, 2], ['a', 'b']) returns [[1, 'a'], [1, 'b'], [2, 'a'], [2, 'b']] - -# PASS test/recordAnimationFrames/recordAnimationFrames.test.js - -ok 488 — recordAnimationFrames is a Function - -# PASS test/memoize/memoize.test.js - -ok 489 — memoize is a Function -ok 490 — Function works properly -ok 491 — Function works properly -ok 492 — Cache stores values - -# PASS test/isPlainObject/isPlainObject.test.js - -ok 493 — isPlainObject is a Function -ok 494 — Returns true for a plain object -ok 495 — Returns false for a Map (example of non-plain object) - -# PASS test/orderBy/orderBy.test.js - -ok 496 — orderBy is a Function -ok 497 — Returns a sorted array of objects ordered by properties and orders. -ok 498 — Returns a sorted array of objects ordered by properties and orders. - -# PASS test/httpGet/httpGet.test.js - -ok 499 — httpGet is a Function - -# PASS test/offset/offset.test.js - -ok 500 — offset is a Function -ok 501 — Offset of 0 returns the same array. -ok 502 — Offset > 0 returns the offsetted array. -ok 503 — Offset < 0 returns the reverse offsetted array. -ok 504 — Offset greater than the length of the array returns the same array. -ok 505 — Offset less than the negative length of the array returns the same array. -ok 506 — Offsetting empty array returns an empty array. - -# PASS test/lcm/lcm.test.js - -ok 507 — lcm is a Function -ok 508 — Returns the least common multiple of two or more numbers. -ok 509 — Returns the least common multiple of two or more numbers. - -# PASS test/clampNumber/clampNumber.test.js - -ok 510 — clampNumber is a Function -ok 511 — Clamps num within the inclusive range specified by the boundary values a and b - -# PASS test/degreesToRads/degreesToRads.test.js - -ok 512 — degreesToRads is a Function -ok 513 — Returns the appropriate value - -# PASS test/URLJoin/URLJoin.test.js - -ok 514 — URLJoin is a Function -ok 515 — Returns proper URL -ok 516 — Returns proper URL - -# PASS test/currentURL/currentURL.test.js - -ok 517 — currentURL is a Function - -# PASS test/UUIDGeneratorBrowser/UUIDGeneratorBrowser.test.js - -ok 518 — UUIDGeneratorBrowser is a Function - -# PASS test/isArrayLike/isArrayLike.test.js - -ok 519 — isArrayLike is a Function -ok 520 — Returns true for a string -ok 521 — Returns true for an array -ok 522 — Returns false for null - -# PASS test/geometricProgression/geometricProgression.test.js - -ok 523 — geometricProgression is a Function -ok 524 — Initializes an array containing the numbers in the specified range -ok 525 — Initializes an array containing the numbers in the specified range -ok 526 — Initializes an array containing the numbers in the specified range - -# PASS test/JSONToDate/JSONToDate.test.js - -ok 527 — JSONToDate is a Function - -# PASS test/bindKey/bindKey.test.js - -ok 528 — bindKey is a Function -ok 529 — Binds function to an object context - -# PASS test/cloneRegExp/cloneRegExp.test.js - -ok 530 — cloneRegExp is a Function -ok 531 — Clones regular expressions properly - -# PASS test/any/any.test.js - -ok 532 — any is a Function -ok 533 — Returns true for arrays with at least one truthy value -ok 534 — Returns false for arrays with no truthy values -ok 535 — Returns false for arrays with no truthy values -ok 536 — Returns true with predicate function -ok 537 — Returns false with a predicate function - -# PASS test/mask/mask.test.js - -ok 538 — mask is a Function -ok 539 — Replaces all but the last num of characters with the specified mask character -ok 540 — Replaces all but the last num of characters with the specified mask character -ok 541 — Replaces all but the last num of characters with the specified mask character - -# PASS test/zipWith/zipWith.test.js - -ok 542 — zipWith is a Function - -# PASS test/throttle/throttle.test.js - -ok 543 — throttle is a Function - -# PASS test/without/without.test.js - -ok 544 — without is a Function -ok 545 — without([2, 1, 2, 3], 1, 2) returns [3] -ok 546 — without([]) returns [] -ok 547 — without([3, 1, true, '3', true], '3', true) returns [3, 1] -ok 548 — without('string'.split(''), 's', 't', 'g') returns ['r', 'i', 'n'] -ok 549 — without() throws an error -ok 550 — without(null) throws an error -ok 551 — without(undefined) throws an error -ok 552 — without(123) throws an error -ok 553 — without({}) throws an error - -# PASS test/radsToDegrees/radsToDegrees.test.js - -ok 554 — radsToDegrees is a Function -ok 555 — Returns the appropriate value - -# PASS test/approximatelyEqual/approximatelyEqual.test.js - -ok 556 — approximatelyEqual is a Function -ok 557 — Works for PI / 2 -ok 558 — Works for 0.1 + 0.2 === 0.3 -ok 559 — Works for exactly equal values -ok 560 — Works for a custom epsilon - -# PASS test/none/none.test.js - -ok 561 — none is a Function -ok 562 — Returns true for arrays with no truthy values -ok 563 — Returns false for arrays with at least one truthy value -ok 564 — Returns true with a predicate function -ok 565 — Returns false with predicate function - -# PASS test/isSimilar/isSimilar.test.js - -ok 566 — isSimilar is a Function - -# PASS test/arrayToHtmlList/arrayToHtmlList.test.js - -ok 567 — arrayToHtmlList is a Function - -# PASS test/bifurcateBy/bifurcateBy.test.js - -ok 568 — bifurcateBy is a Function -ok 569 — Splits the collection into two groups - -# PASS test/CSVToArray/CSVToArray.test.js - -ok 570 — CSVToArray is a Function -ok 571 — CSVToArray works with default delimiter -ok 572 — CSVToArray works with custom delimiter -ok 573 — CSVToArray omits the first row -ok 574 — CSVToArray omits the first row and works with a custom delimiter - -# PASS test/cleanObj/cleanObj.test.js - -ok 575 — cleanObj is a Function -ok 576 — Removes any properties except the ones specified from a JSON object - -# PASS test/isTypedArray/isTypedArray.test.js - -ok 577 — isTypedArray is a Function - -# PASS test/pluralize/pluralize.test.js - -ok 578 — pluralize is a Function -ok 579 — Produces the plural of the word -ok 580 — Produces the singular of the word -ok 581 — Produces the plural of the word -ok 582 — Prodices the defined plural of the word -ok 583 — Works with a dictionary - -# PASS test/bindAll/bindAll.test.js - -ok 584 — bindAll is a Function -ok 585 — Binds to an object context - -# PASS test/capitalize/capitalize.test.js - -ok 586 — capitalize is a Function -ok 587 — Capitalizes the first letter of a string -ok 588 — Capitalizes the first letter of a string -ok 589 — Works with characters -ok 590 — "Works with single character words - -# PASS test/getMeridiemSuffixOfInteger/getMeridiemSuffixOfInteger.test.js - -ok 591 — getMeridiemSuffixOfInteger is a Function - -# PASS test/lowercaseKeys/lowercaseKeys.test.js - -ok 592 — lowercaseKeys is a Function -ok 593 — Lowercases object keys -ok 594 — Does not mutate original object - -# PASS test/pullAtIndex/pullAtIndex.test.js - -ok 595 — pullAtIndex is a Function -ok 596 — Pulls the given values -ok 597 — Pulls the given values - -# PASS test/isBrowserTabFocused/isBrowserTabFocused.test.js - -ok 598 — isBrowserTabFocused is a Function - -# PASS test/fibonacciCountUntilNum/fibonacciCountUntilNum.test.js - -ok 599 — fibonacciCountUntilNum is a Function - -# PASS test/isEmpty/isEmpty.test.js - -ok 600 — isEmpty is a Function -ok 601 — Returns true for empty Map -ok 602 — Returns true for empty Set -ok 603 — Returns true for empty array -ok 604 — Returns true for empty object -ok 605 — Returns true for empty string -ok 606 — Returns false for non-empty array -ok 607 — Returns false for non-empty object -ok 608 — Returns false for non-empty string -ok 609 — Returns true - type is not considered a collection -ok 610 — Returns true - type is not considered a collection - -# PASS test/isTravisCI/isTravisCI.test.js - -ok 611 — isTravisCI is a Function -ok 612 — Not running on Travis, correctly evaluates - -# PASS test/truthCheckCollection/truthCheckCollection.test.js - -ok 613 — truthCheckCollection is a Function -ok 614 — second argument is truthy on all elements of a collection - -# PASS test/dropRightWhile/dropRightWhile.test.js - -ok 615 — dropRightWhile is a Function -ok 616 — Removes elements from the end of an array until the passed function returns true. - -# PASS test/colorize/colorize.test.js - -ok 617 — colorize is a Function - -# PASS test/chainAsync/chainAsync.test.js - -ok 618 — chainAsync is a Function -ok 619 — Calls all functions in an array - -# PASS test/negate/negate.test.js - -ok 620 — negate is a Function -ok 621 — Negates a predicate function - -# PASS test/functions/functions.test.js - -ok 622 — functions is a Function -ok 623 — Returns own methods -ok 624 — Returns own and inherited methods - -# PASS test/isPrimitive/isPrimitive.test.js - -ok 625 — isPrimitive is a Function -ok 626 — isPrimitive(null) is primitive -ok 627 — isPrimitive(undefined) is primitive -ok 628 — isPrimitive(string) is primitive -ok 629 — isPrimitive(true) is primitive -ok 630 — isPrimitive(50) is primitive -ok 631 — isPrimitive('Hello') is primitive -ok 632 — isPrimitive(false) is primitive -ok 633 — isPrimitive(Symbol()) is primitive -ok 634 — isPrimitive([1, 2, 3]) is not primitive -ok 635 — isPrimitive({ a: 123 }) is not primitive -ok 636 — isPrimitive({ a: 123 }) takes less than 2s to run - -# PASS test/initial/initial.test.js - -ok 637 — initial is a Function -ok 638 — Returns all the elements of an array except the last one - -# PASS test/getColonTimeFromDate/getColonTimeFromDate.test.js - -ok 639 — getColonTimeFromDate is a Function - -# PASS test/unzip/unzip.test.js - -ok 640 — unzip is a Function -ok 641 — unzip([['a', 1, true], ['b', 2, false]]) equals [['a','b'], [1, 2], [true, false]] -ok 642 — unzip([['a', 1, true], ['b', 2]]) equals [['a','b'], [1, 2], [true]] - -# PASS test/intersection/intersection.test.js - -ok 643 — intersection is a Function -ok 644 — Returns a list of elements that exist in both arrays - -# PASS test/UUIDGeneratorNode/UUIDGeneratorNode.test.js - -ok 645 — UUIDGeneratorNode is a Function -ok 646 — Contains dashes in the proper places -ok 647 — Only contains hexadecimal digits - -# PASS test/reduceWhich/reduceWhich.test.js - -ok 648 — reduceWhich is a Function -ok 649 — Returns the minimum of an array -ok 650 — Returns the maximum of an array -ok 651 — Returns the object with the minimum specified value in an array - -# PASS test/sortedIndexBy/sortedIndexBy.test.js - -ok 652 — sortedIndexBy is a Function -ok 653 — Returns the lowest index to insert the element without messing up the list order - -# PASS test/randomIntArrayInRange/randomIntArrayInRange.test.js - -ok 654 — randomIntArrayInRange is a Function -ok 655 — The returned array contains only integers -ok 656 — The returned array has the proper length -ok 657 — The returned array's values lie between provided lowerLimit and upperLimit (both inclusive). - -# PASS test/deepFlatten/deepFlatten.test.js - -ok 658 — deepFlatten is a Function -ok 659 — Deep flattens an array - -# PASS test/escapeRegExp/escapeRegExp.test.js - -ok 660 — escapeRegExp is a Function -ok 661 — Escapes a string to use in a regular expression - -# PASS test/countVowels/countVowels.test.js - -ok 662 — countVowels is a Function - -# PASS test/unionBy/unionBy.test.js - -ok 663 — unionBy is a Function -ok 664 — Produces the appropriate results - -# PASS test/findKey/findKey.test.js - -ok 665 — findKey is a Function -ok 666 — Returns the appropriate key - -# PASS test/findLastIndex/findLastIndex.test.js - -ok 667 — findLastIndex is a Function -ok 668 — Finds last index for which the given function returns true - -# PASS test/shuffle/shuffle.test.js - -ok 669 — shuffle is a Function -ok 670 — Shuffles the array -ok 671 — New array contains all original elements -ok 672 — Works for empty arrays -ok 673 — Works for single-element arrays - -# PASS test/attempt/attempt.test.js - -ok 674 — attempt is a Function -ok 675 — Returns a value -ok 676 — Returns an error - -# PASS test/drop/drop.test.js - -ok 677 — drop is a Function -ok 678 — Works without the last argument -ok 679 — Removes appropriate element count as specified -ok 680 — Empties array given a count greater than length - -# PASS test/forOwnRight/forOwnRight.test.js - -ok 681 — forOwnRight is a Function -ok 682 — Iterates over an element's key-value pairs in reverse - -# PASS test/flip/flip.test.js - -ok 683 — flip is a Function -ok 684 — Flips argument order - -# PASS test/when/when.test.js - -ok 685 — when is a Function -ok 686 — Returns the proper result -ok 687 — Returns the proper result - -# PASS test/readFileLines/readFileLines.test.js - -ok 688 — readFileLines is a Function - -# PASS test/createElement/createElement.test.js - -ok 689 — createElement is a Function - -# PASS test/renameKeys/renameKeys.test.js - -ok 690 — renameKeys is a Function -ok 691 — renameKeys is a Function - -# PASS test/coalesceFactory/coalesceFactory.test.js - -ok 692 — coalesceFactory is a Function -ok 693 — Returns a customized coalesce function - -# PASS test/onUserInputChange/onUserInputChange.test.js - -ok 694 — onUserInputChange is a Function - -# PASS test/reject/reject.test.js - -ok 695 — reject is a Function -ok 696 — Works with numbers -ok 697 — Works with strings - -# PASS test/isMap/isMap.test.js - -ok 698 — isMap is a Function - -# PASS test/reduceSuccessive/reduceSuccessive.test.js - -ok 699 — reduceSuccessive is a Function -ok 700 — Returns the array of successively reduced values - -# PASS test/byteSize/byteSize.test.js - -ok 701 — byteSize is a Function -ok 702 — Works for a single letter -ok 703 — Works for a common string -ok 704 — Works for emoji - -# PASS test/omitBy/omitBy.test.js - -ok 705 — omitBy is a Function -ok 706 — Creates an object composed of the properties the given function returns falsey for - -# PASS test/elementIsVisibleInViewport/elementIsVisibleInViewport.test.js - -ok 707 — elementIsVisibleInViewport is a Function - -# PASS test/objectToPairs/objectToPairs.test.js - -ok 708 — objectToPairs is a Function -ok 709 — Creates an array of key-value pair arrays from an object. - -# PASS test/isFunction/isFunction.test.js - -ok 710 — isFunction is a Function -ok 711 — passed value is a function -ok 712 — passed value is not a function - -# PASS test/httpDelete/httpDelete.test.js - -ok 713 — httpDelete is a Function - -# PASS test/bifurcate/bifurcate.test.js - -ok 714 — bifurcate is a Function -ok 715 — Splits the collection into two groups - -# PASS test/equals/equals.test.js - -ok 716 — equals is a Function -ok 717 — { a: [2, {e: 3}], b: [4], c: 'foo' } is equal to { a: [2, {e: 3}], b: [4], c: 'foo' } -ok 718 — [1,2,3] is equal to [1,2,3] -ok 719 — { a: [2, 3], b: [4] } is not equal to { a: [2, 3], b: [6] } -ok 720 — [1,2,3] is not equal to [1,2,4] -ok 721 — [1, 2, 3] should be equal to { 0: 1, 1: 2, 2: 3 }) - type is different, but their enumerable properties match. - -# PASS test/compact/compact.test.js - -ok 722 — compact is a Function -ok 723 — Removes falsey values from an array - -# PASS test/uncurry/uncurry.test.js - -ok 724 — uncurry is a Function -ok 725 — Works without a provided value for n -ok 726 — Works with n = 2 -ok 727 — Works with n = 3 - -# PASS test/sleep/sleep.test.js - -ok 728 — sleep is a Function -ok 729 — Works as expected - -# PASS test/scrollToTop/scrollToTop.test.js - -ok 730 — scrollToTop is a Function - -# PASS test/initializeArrayWithRangeRight/initializeArrayWithRangeRight.test.js - -ok 731 — initializeArrayWithRangeRight is a Function - -# PASS test/triggerEvent/triggerEvent.test.js - -ok 732 — triggerEvent is a Function - -# PASS test/toggleClass/toggleClass.test.js - -ok 733 — toggleClass is a Function - -# PASS test/forOwn/forOwn.test.js - -ok 734 — forOwn is a Function -ok 735 — Iterates over an element's key-value pairs - -# PASS test/hammingDistance/hammingDistance.test.js - -ok 736 — hammingDistance is a Function -ok 737 — retuns hamming disance between 2 values - -# PASS test/isString/isString.test.js - -ok 738 — isString is a Function -ok 739 — foo is a string -ok 740 — "10" is a string -ok 741 — Empty string is a string -ok 742 — 10 is not a string -ok 743 — true is not string - -# PASS test/parseCookie/parseCookie.test.js - -ok 744 — parseCookie is a Function -ok 745 — Parses the cookie - -# PASS test/btoa/btoa.test.js - -ok 746 — btoa is a Function -ok 747 — btoa("foobar") equals "Zm9vYmFy" - -# PASS test/partialRight/partialRight.test.js - -ok 748 — partialRight is a Function -ok 749 — Appends arguments - -# PASS test/takeRight/takeRight.test.js - -ok 750 — takeRight is a Function -ok 751 — Returns an array with n elements removed from the end -ok 752 — Returns an array with n elements removed from the end - -# PASS test/shallowClone/shallowClone.test.js - -ok 753 — shallowClone is a Function -ok 754 — Shallow cloning works -ok 755 — Does not clone deeply - -# PASS test/pickBy/pickBy.test.js - -ok 756 — pickBy is a Function -ok 757 — Creates an object composed of the properties the given function returns truthy for. - -# PASS test/unfold/unfold.test.js - -ok 758 — unfold is a Function -ok 759 — Works with a given function, producing an array - -# PASS test/redirect/redirect.test.js - -ok 760 — redirect is a Function - -# PASS test/groupBy/groupBy.test.js - -ok 761 — groupBy is a Function -ok 762 — Groups the elements of an array based on the given function -ok 763 — Groups the elements of an array based on the given function - -# PASS test/maxN/maxN.test.js - -ok 764 — maxN is a Function -ok 765 — Returns the n maximum elements from the provided array -ok 766 — Returns the n maximum elements from the provided array - -# PASS test/partial/partial.test.js - -ok 767 — partial is a Function -ok 768 — Prepends arguments - -# PASS test/mapValues/mapValues.test.js - -ok 769 — mapValues is a Function -ok 770 — Maps values - -# PASS test/hexToRGB/hexToRGB.test.js - -ok 771 — hexToRGB is a Function -ok 772 — Converts a color code to a rgb() or rgba() string -ok 773 — Converts a color code to a rgb() or rgba() string -ok 774 — Converts a color code to a rgb() or rgba() string - -# PASS test/intersectionBy/intersectionBy.test.js - -ok 775 — intersectionBy is a Function -ok 776 — Returns a list of elements that exist in both arrays, after applying the provided function to each array element of both - -# PASS test/hasFlags/hasFlags.test.js - -ok 777 — hasFlags is a Function - -# PASS test/stableSort/stableSort.test.js - -ok 778 — stableSort is a Function -ok 779 — Array is properly sorted - -# PASS test/randomNumberInRange/randomNumberInRange.test.js - -ok 780 — randomNumberInRange is a Function -ok 781 — The returned value is a number -ok 782 — The returned value lies between provided lowerLimit and upperLimit (both inclusive). - -# PASS test/pull/pull.test.js - -ok 783 — pull is a Function -ok 784 — Pulls the specified values - -# PASS test/over/over.test.js - -ok 785 — over is a Function -ok 786 — Applies given functions over multiple arguments - -# PASS test/hasClass/hasClass.test.js - -ok 787 — hasClass is a Function - -# PASS test/isLowerCase/isLowerCase.test.js - -ok 788 — isLowerCase is a Function -ok 789 — passed string is a lowercase -ok 790 — passed string is a lowercase -ok 791 — passed value is not a lowercase - -# PASS test/isSet/isSet.test.js - -ok 792 — isSet is a Function - -# PASS test/getDaysDiffBetweenDates/getDaysDiffBetweenDates.test.js - -ok 793 — getDaysDiffBetweenDates is a Function -ok 794 — Returns the difference in days between two dates - -# PASS test/sortedLastIndex/sortedLastIndex.test.js - -ok 795 — sortedLastIndex is a Function -ok 796 — Returns the highest index to insert the element without messing up the list order - -# PASS test/take/take.test.js - -ok 797 — take is a Function -ok 798 — Returns an array with n elements removed from the beginning. -ok 799 — Returns an array with n elements removed from the beginning. - -# PASS test/solveRPN/solveRPN.test.js - -ok 800 — solveRPN is a Function - -# PASS test/pipeAsyncFunctions/pipeAsyncFunctions.test.js - -ok 801 — pipeAsyncFunctions is a Function -ok 802 — pipeAsyncFunctions result should be 15 - -# PASS test/takeRightWhile/takeRightWhile.test.js - -ok 803 — takeRightWhile is a Function -ok 804 — Removes elements until the function returns true - -# PASS test/initializeArrayWithValues/initializeArrayWithValues.test.js - -ok 805 — initializeArrayWithValues is a Function -ok 806 — Initializes and fills an array with the specified values - -# PASS test/primes/primes.test.js - -ok 807 — primes is a Function -ok 808 — Generates primes up to a given number, using the Sieve of Eratosthenes. - -# PASS test/nthArg/nthArg.test.js - -ok 809 — nthArg is a Function -ok 810 — Returns the nth argument -ok 811 — Returns undefined if arguments too few -ok 812 — Works for negative values - -# PASS test/bottomVisible/bottomVisible.test.js - -ok 813 — bottomVisible is a Function - -# PASS test/objectFromPairs/objectFromPairs.test.js - -ok 814 — objectFromPairs is a Function -ok 815 — Creates an object from the given key-value pairs. - -# PASS test/pullAtValue/pullAtValue.test.js - -ok 816 — pullAtValue is a Function -ok 817 — Pulls the specified values -ok 818 — Pulls the specified values - -# PASS test/isObjectLike/isObjectLike.test.js - -ok 819 — isObjectLike is a Function -ok 820 — Returns true for an object -ok 821 — Returns true for an array -ok 822 — Returns false for a function -ok 823 — Returns false for null - -# PASS test/collectInto/collectInto.test.js - -ok 824 — collectInto is a Function -ok 825 — Works with multiple promises - -# PASS test/isEven/isEven.test.js - -ok 826 — isEven is a Function -ok 827 — 4 is even number -ok 828 — 5 is not an even number - -# PASS test/deepClone/deepClone.test.js - -ok 829 — deepClone is a Function -ok 830 — Shallow cloning works -ok 831 — Deep cloning works -ok 832 — Array shallow cloning works -ok 833 — Array deep cloning works - -# PASS test/copyToClipboard/copyToClipboard.test.js - -ok 834 — copyToClipboard is a Function - -# PASS test/isWeakMap/isWeakMap.test.js - -ok 835 — isWeakMap is a Function - -# PASS test/hashBrowser/hashBrowser.test.js - -ok 836 — hashBrowser is a Function - -# PASS test/stripHTMLTags/stripHTMLTags.test.js - -ok 837 — stripHTMLTags is a Function -ok 838 — Removes HTML tags - -# PASS test/speechSynthesis/speechSynthesis.test.js - -ok 839 — speechSynthesis is a Function - -# PASS test/formatDuration/formatDuration.test.js - -ok 840 — formatDuration is a Function -ok 841 — Returns the human readable format of the given number of milliseconds -ok 842 — Returns the human readable format of the given number of milliseconds - -# PASS test/findLastKey/findLastKey.test.js - -ok 843 — findLastKey is a Function -ok 844 — eturns the appropriate key - -# PASS test/isBrowser/isBrowser.test.js - -ok 845 — isBrowser is a Function - -# PASS test/getScrollPosition/getScrollPosition.test.js - -ok 846 — getScrollPosition is a Function - -# PASS test/elementContains/elementContains.test.js - -ok 847 — elementContains is a Function - -# PASS test/omit/omit.test.js - -ok 848 — omit is a Function -ok 849 — Omits the key-value pairs corresponding to the given keys from an object - -# PASS test/hashNode/hashNode.test.js - -ok 850 — hashNode is a Function -ok 851 — Produces the appropriate hash - -# PASS test/fibonacci/fibonacci.test.js - -ok 852 — fibonacci is a Function -ok 853 — Generates an array, containing the Fibonacci sequence - -# PASS test/minBy/minBy.test.js - -ok 854 — minBy is a Function -ok 855 — Produces the right result with a function -ok 856 — Produces the right result with a property name - -# PASS test/isUndefined/isUndefined.test.js - -ok 857 — isUndefined is a Function -ok 858 — Returns true for undefined - -# PASS test/curry/curry.test.js - -ok 859 — curry is a Function -ok 860 — curries a Math.pow -ok 861 — curries a Math.min - -# PASS test/fibonacciUntilNum/fibonacciUntilNum.test.js - -ok 862 — fibonacciUntilNum is a Function - -# PASS test/call/call.test.js - -ok 863 — call is a Function -ok 864 — Calls function on given object - -# PASS test/serializeCookie/serializeCookie.test.js - -ok 865 — serializeCookie is a Function -ok 866 — Serializes the cookie - -# PASS test/times/times.test.js - -ok 867 — times is a Function -ok 868 — Runs a function the specified amount of times - -# PASS test/toOrdinalSuffix/toOrdinalSuffix.test.js - -ok 869 — toOrdinalSuffix is a Function -ok 870 — Adds an ordinal suffix to a number -ok 871 — Adds an ordinal suffix to a number -ok 872 — Adds an ordinal suffix to a number -ok 873 — Adds an ordinal suffix to a number - -# PASS test/arrayToCSV/arrayToCSV.test.js - -ok 874 — arrayToCSV is a Function -ok 875 — arrayToCSV works with default delimiter -ok 876 — arrayToCSV works with custom delimiter - -# PASS test/countOccurrences/countOccurrences.test.js - -ok 877 — countOccurrences is a Function -ok 878 — Counts the occurrences of a value in an array - -# PASS test/promisify/promisify.test.js - -ok 879 — promisify is a Function -ok 880 — Returns a promise -ok 881 — Runs the function provided - -# PASS test/sumPower/sumPower.test.js - -ok 882 — sumPower is a Function -ok 883 — Returns the sum of the powers of all the numbers from start to end -ok 884 — Returns the sum of the powers of all the numbers from start to end -ok 885 — Returns the sum of the powers of all the numbers from start to end - -# PASS test/isArrayBuffer/isArrayBuffer.test.js - -ok 886 — isArrayBuffer is a Function - -# PASS test/prefix/prefix.test.js - -ok 887 — prefix is a Function - -# PASS test/overArgs/overArgs.test.js - -ok 888 — overArgs is a Function -ok 889 — Invokes the provided function with its arguments transformed - -# PASS test/isArmstrongNumber/isArmstrongNumber.test.js - -ok 890 — isArmstrongNumber is a Function - -# PASS test/intersectionWith/intersectionWith.test.js - -ok 891 — intersectionWith is a Function -ok 892 — Returns a list of elements that exist in both arrays, using a provided comparator function - -# PASS test/standardDeviation/standardDeviation.test.js - -ok 893 — standardDeviation is a Function -ok 894 — Returns the standard deviation of an array of numbers -ok 895 — Returns the standard deviation of an array of numbers - -# PASS test/averageBy/averageBy.test.js - -ok 896 — averageBy is a Function -ok 897 — Produces the right result with a function -ok 898 — Produces the right result with a property name - -# PASS test/isRegExp/isRegExp.test.js - -ok 899 — isRegExp is a Function - -# PASS test/extendHex/extendHex.test.js - -ok 900 — extendHex is a Function -ok 901 — Extends a 3-digit color code to a 6-digit color code -ok 902 — Extends a 3-digit color code to a 6-digit color code - -# PASS test/toHash/toHash.test.js - -ok 903 — toHash is a Function - -# PASS test/dropWhile/dropWhile.test.js - -ok 904 — dropWhile is a Function -ok 905 — Removes elements in an array until the passed function returns true. - -# PASS test/truncateString/truncateString.test.js - -ok 906 — truncateString is a Function -ok 907 — Truncates a "boomerang" up to a specified length. - -# PASS test/isDivisible/isDivisible.test.js - -ok 908 — isDivisible is a Function -ok 909 — The number 6 is divisible by 3 - -# PASS test/delay/delay.test.js - -ok 910 — delay is a Function -ok 911 — Works as expecting, passing arguments properly - -# PASS test/createEventHub/createEventHub.test.js - -ok 912 — createEventHub is a Function - -# PASS test/insertAfter/insertAfter.test.js - -ok 913 — insertAfter is a Function - -# PASS test/levenshteinDistance/levenshteinDistance.test.js - -ok 914 — levenshteinDistance is a Function - -# PASS test/unescapeHTML/unescapeHTML.test.js - -ok 915 — unescapeHTML is a Function -ok 916 — Unescapes escaped HTML characters. - -# PASS test/maxBy/maxBy.test.js - -ok 917 — maxBy is a Function -ok 918 — Produces the right result with a function -ok 919 — Produces the right result with a property name - -# PASS test/show/show.test.js - -ok 920 — show is a Function - -# PASS test/nodeListToArray/nodeListToArray.test.js - -ok 921 — nodeListToArray is a Function - -# PASS test/setStyle/setStyle.test.js - -ok 922 — setStyle is a Function - -# PASS test/pad/pad.test.js - -ok 923 — pad is a Function -ok 924 — cat is padded on both sides -ok 925 — length of string is 8 -ok 926 — pads 42 with "0" -ok 927 — does not truncates if string exceeds length - -# PASS test/merge/merge.test.js - -ok 928 — merge is a Function -ok 929 — Merges two objects - -# PASS test/forEachRight/forEachRight.test.js - -ok 930 — forEachRight is a Function -ok 931 — Iterates over the array in reverse - -# PASS test/isNumber/isNumber.test.js - -ok 932 — isNumber is a Function -ok 933 — passed argument is a number -ok 934 — passed argument is not a number - -# PASS test/defaults/defaults.test.js - -ok 935 — defaults is a Function -ok 936 — Assigns default values for undefined properties - -# PASS test/RGBToHex/RGBToHex.test.js - -ok 937 — RGBToHex is a Function -ok 938 — Converts the values of RGB components to a color code. - -# PASS test/converge/converge.test.js - -ok 939 — converge is a Function -ok 940 — Produces the average of the array -ok 941 — Produces the strange concatenation - -# PASS test/minN/minN.test.js - -ok 942 — minN is a Function -ok 943 — Returns the n minimum elements from the provided array -ok 944 — Returns the n minimum elements from the provided array - -# PASS test/unzipWith/unzipWith.test.js - -ok 945 — unzipWith is a Function -ok 946 — unzipWith([[1, 10, 100], [2, 20, 200]], (...args) => args.reduce((acc, v) => acc + v, 0)) equals [3, 30, 300] - -# PASS test/hide/hide.test.js - -ok 947 — hide is a Function - -# PASS test/palindrome/palindrome.test.js - -ok 948 — palindrome is a Function -ok 949 — Given string is a palindrome -ok 950 — Given string is not a palindrome - -# PASS test/observeMutations/observeMutations.test.js - -ok 951 — observeMutations is a Function - -# PASS test/detectDeviceType/detectDeviceType.test.js - -ok 952 — detectDeviceType is a Function - -# PASS test/httpPut/httpPut.test.js - -ok 953 — httpPut is a Function - -# PASS test/pick/pick.test.js - -ok 954 — pick is a Function -ok 955 — Picks the key-value pairs corresponding to the given keys from an object. - -# PASS test/filterNonUnique/filterNonUnique.test.js - -ok 956 — filterNonUnique is a Function -ok 957 — Filters out the non-unique values in an array - -# PASS test/sortCharactersInString/sortCharactersInString.test.js - -ok 958 — sortCharactersInString is a Function -ok 959 — Alphabetically sorts the characters in a string. - -# PASS test/capitalizeEveryWord/capitalizeEveryWord.test.js - -ok 960 — capitalizeEveryWord is a Function -ok 961 — Capitalizes the first letter of every word in a string -ok 962 — Works with characters -ok 963 — Works with one word string - -# PASS test/symmetricDifferenceWith/symmetricDifferenceWith.test.js - -ok 964 — symmetricDifferenceWith is a Function -ok 965 — Returns the symmetric difference between two arrays, using a provided function as a comparator - -# PASS test/howManyTimes/howManyTimes.test.js - -ok 966 — howManyTimes is a Function - -# PASS test/isWeakSet/isWeakSet.test.js - -ok 967 — isWeakSet is a Function - -# PASS test/symmetricDifference/symmetricDifference.test.js - -ok 968 — symmetricDifference is a Function -ok 969 — Returns the symmetric difference between two arrays. - -# PASS test/decapitalize/decapitalize.test.js - -ok 970 — decapitalize is a Function -ok 971 — Works with default parameter -ok 972 — Works with second parameter set to true - -# PASS test/initializeArrayWithRange/initializeArrayWithRange.test.js - -ok 973 — initializeArrayWithRange is a Function -ok 974 — Initializes an array containing the numbers in the specified range - -# PASS test/ary/ary.test.js - -ok 975 — ary is a Function -ok 976 — Discards arguments with index >=n - -# PASS test/debounce/debounce.test.js - -ok 977 — debounce is a Function -ok 978 — Works as expected - -# PASS test/runAsync/runAsync.test.js - -ok 979 — runAsync is a Function - -# PASS test/sum/sum.test.js - -ok 980 — sum is a Function -ok 981 — Returns the sum of two or more numbers/arrays. - -# PASS test/defer/defer.test.js - -ok 982 — defer is a Function - -# PASS test/getType/getType.test.js - -ok 983 — getType is a Function -ok 984 — Returns the native type of a value - -# PASS test/get/get.test.js - -ok 985 — get is a Function -ok 986 — Retrieve a property indicated by the selector from an object. - -# PASS test/bind/bind.test.js - -ok 987 — bind is a Function -ok 988 — Binds to an object context - -# PASS test/sumBy/sumBy.test.js - -ok 989 — sumBy is a Function - -# PASS test/differenceWith/differenceWith.test.js - -ok 990 — differenceWith is a Function -ok 991 — Filters out all values from an array - -# PASS test/functionName/functionName.test.js - -ok 992 — functionName is a Function -ok 993 — Works for native functions -ok 994 — Works for functions -ok 995 — Works for arrow functions - -# PASS test/removeVowels/removeVowels.test.js - -ok 996 — removeVowels is a Function - -# PASS test/findLast/findLast.test.js - -ok 997 — findLast is a Function -ok 998 — Finds last element for which the given function returns true - -# PASS test/similarity/similarity.test.js - -ok 999 — similarity is a Function -ok 1000 — Returns an array of elements that appear in both arrays. - -# PASS test/JSONToFile/JSONToFile.test.js - -ok 1001 — JSONToFile is a Function - -# PASS test/sdbm/sdbm.test.js - -ok 1002 — sdbm is a Function -ok 1003 — Hashes the input string into a whole number. - -# FAIL test/dig/dig.test.js - -# -# ReferenceError: dig is not defined -# -# Stack: -# -# at Object. (test/dig/dig.js:1:45) -# -# > 1 | module.exports = dig; -# | ^ -# -# at Generator.next () -# at new Promise () -# at Generator.next () -# at - -# PASS test/flatten/flatten.test.js - -ok 1004 — flatten is a Function -ok 1005 — Flattens an array -ok 1006 — Flattens an array - -1..1006 - -# Test Suites: 99% ██████████, 2 failed, 338 passed, 340 total -# Tests: 100% ██████████, 1 failed, 1005 passed, 1006 total -# Time: 5.767s, estimated 5s - -# Ran all test suites. - -undefined \ No newline at end of file