summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* fix: address edge case in comment stripping (#1780)Rich Trott2022-01-091-3/+7
| | | | | | | | Unforunately, cdfb4917e6028c8f966276d6e792018c7fd2ae3c introduced issues with certain edge cases for comments. Fixing the edge case in the regular expression is likely to reintroduce the issue that commit was addressing. This change replaces the regular expression entirely with a function that iterates through the string instead of regular expressions.
* Housekeeping (#1772)Jimmy Wärting2021-12-021-6/+6
| | | | | | | | | | | | | | | | | | | * rimraf was not being used * one less use of lodash dep * shorter name variant * one less lodash fn being used * use native forEach * result was a object * one less lodash recommendation * more explicit path * removed a unused variable
* Fix an inefficient regex in autoInject (#1767)meekdenzo2021-12-021-0/+29
| | | | | | | | | | | | | | | | | | | * Fix an inefficient regex in autoInject * 'properly strip comments in argument definitions' test failure * Update test/autoInject.js Co-authored-by: Rich Trott <rtrott@gmail.com> * Update on url-comments lib/autoInject.js Co-authored-by: Rich Trott <rtrott@gmail.com> * move new tests test/autoInject.js * indentation fix test/autoInject.js Co-authored-by: Rich Trott <rtrott@gmail.com>
* Fix prototype pollution vulnerabilityAlexander Early2021-10-271-0/+11
|
* use queueMicrotask instead of setTimeout in browsers in order to avoid ↵Garrett Jensen2021-08-051-3/+3
| | | | browser throttling (#1761)
* Improving tests case coverage (#1754)Saurav Azad2021-06-282-2/+17
| | | | | | | * Adding test case when invalid callback is provided to each () * adding nyc ignore block * Adding new test cases for drain to be called if empty data is pushed
* chore: Fix typo in detect.js (#1749)Ikko Ashimine2021-06-021-1/+1
| | | mulitple -> multiple
* fix tests related to wrapped function namesAlexander Early2020-02-231-60/+0
|
* chore: tighten up timeout on timesAlexander Early2019-06-301-4/+4
|
* chore: enable full object output for chaiAlexander Early2019-06-302-0/+4
|
* fix test actuallyAlexander Early2019-06-221-2/+2
|
* fix testAlexander Early2019-06-221-1/+1
|
* even moar coverageAlexander Early2019-06-221-0/+22
|
* moar coverageAlexander Early2019-06-222-0/+28
|
* improve coverage of forEachAsyncAlexander Early2019-06-221-0/+30
|
* more reflectAll covereageAlexander Early2019-06-221-11/+11
|
* fix tests in firefoxAlexander Early2019-06-221-6/+6
|
* feat(queue): add pushAsync and unshiftAsync functions that reject on error. ↵Alexander Early2019-06-222-0/+41
| | | | Closes #1659
* fix(autoInject): tighten up regex for parsing args. Closes #1663Alexander Early2019-06-221-0/+76
|
* rework applyEach tests. Closes #1646Alexander Early2019-05-261-18/+18
|
* add more variation in autoInject testAlexander Early2019-05-261-4/+4
|
* fix: don't completely flatten arrays pushed to queue/cargo. Fixes #1645Alexander Early2019-05-241-1/+19
|
* BREAKING CHANGE: awaitable queues (#1641)Alex Early2019-05-196-126/+168
| | | | | | | | | | | | * BREAKING CHANGE: awaitable queues * fix priorityQueue tests * fix tests in firefox * make the upgrade a bit more user-friendly * clarify docs
* BREAKING CHANGE: remove partial application feature of applyEach (#1640)Alex Early2019-05-194-44/+28
| | | | | | * BREAKING CHANGE: remove partial application feature of applyEach * add awaitable tests for applyEach
* chore: Add Azure Pipelines for CI (Windows, Linux, Mac) (#1630), Fix async ↵Pablo Núñez2019-04-0712-78/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function serialization in Safari. * Add azure pipelines CI. * Publish test results. * Enable coveralls * Use Safari for OSX browser tests. * Adding missing lib files to karma (only Safari complained). * Rename with dot so it gets better placed in order. * Use ci instead of install, so we stick with package-lock.json * Use npm test instead of mocha directly. It just needed a double -- escape. * Move DISPLAY to Linux only, with value set just once. * Use variables for DISPLAY, browser tests and coveralls. * Simplify steps with a browser name variable. * Run junit reporter on CI only. * DISPLAY should be already an environment variable. * Use vmImage for consistency with other OS. * Don't use verbose npm@1 task. * No need to setTimeout, let's `done` on the callback. * Don't resume twice. Check queue length on callback for safety, setTimeout may be delayed. * Avoid time dependency, act on events instead. * Avoid dependency on timing to final assertion. * Rewrite test to avoid setTimeout * Fix formatting. * Make diff more significant (125+50 ~= 200) * Make diff more significant to avoid race conditions. * Wait a bit more so default 5 retries did happen. * Make delays shorter to avoid "Timeout of 250ms exceeded" * Shorten delay to avoid 200ms test timeout in browser tests. * Shorten timeout to mitigate 200ms test timeout. * Add more diff on delays to enforce test behavior. * Make delays more significant to avoid race conditions. * Stop using setTimeout and rely on events to push new items, so order is enforced. * Fix async function serialization in Safari. * Add more delay so 4 never completes before 3. * Ensure 3 never completes before 4. * Use drain instead of task count. Trying to ensure done is called from Windows browser tests that fail frequently. * Ensure 2 starts before 3 arrives.Avoid expected 'process 2 3' to equal 'process 2' * Add retries to browser tests. * Don't fail all on Mac & Windows browser tests. * Ensure 3 happens before 2, it fails sparely on OSX. AssertionError: expected [ 1, 2, 3 ] to deeply equal [ 1, 3, 2 ] * Avoid unnecessary multilines. * Use Edge for Windows browser tests.
* fix: Reflect passes value on error (#1633)Alex Early2019-03-093-12/+29
| | | | | | * Reflects any values passed even if function has error * fix async function tests
* initialize results in whilst [fixes #1626] (#1628)Hubert Argasinski2019-03-011-0/+18
|
* fix: stop priorityQueue from draining while items still pending (#1623)André Guedes2019-02-201-0/+36
| | | | | | | | | | | | | | | | * fix: priorityQueue drains while items still pending Priority queue should check if the underlying queue is idle before draining. Currently the priorityQueue drains if an empty array of tasks is pushed even if other tasks are processing. * test: adds test for priorityQueue draining before tasks ended * test: lint fix * test: adds running assert to drain on test/priorityQueue.js Co-Authored-By: andrebsguedes <andrebsguedes@gmail.com>
* fix: send proper retry count to retry's interaval func (#1621)Alex Early2019-02-131-1/+6
| | | Closes #1578
* Fixes #1582 (#1597)Hubert Argasinski2018-11-2721-10/+909
| | | | | | * ensure err is passed on for cancelable methods * fix test descriptions
* feat: Use heap tree in priority queue (#1595)yemreinci2018-11-201-0/+124
| | | | | | * use heap tree in priority queue * small refactor
* feat: await-able Async methods (#1572)Alex Early2018-09-303-1/+583
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * make each and family awaitable * dont pretend they're AsyncFunctions * check errors * ensure function name is preserved somehow * awaitable concat * awaitable detect * awaitable every/filter * awaitable groupBy * awaitable map/mapValues * awaitable reduce * awaitable reject * awaitable some * awaitable transform * awaitable times * awaitable auto * awaitable compose/seq * awaitable whilst/until (lol) * awaitable forever * awaitable parallel/race * awaitable retry * awaitable series (lol) * awaitable tryEach * awaitable waterfall (lol) * lint * cleanup, remove noop and unused internal functions
* feat: Add cargoQueue type and tests (#1567)Justin Chase2018-08-071-0/+333
| | | | | | | | | | * Add cargo queue type and tests * remove only on tests * make failing test more deterministic * Dont define a new type
* [wip] initial async generator support (#1560)Alex Early2018-08-052-2/+104
| | | feat: initial async generator support
* [issue-1568][bug]: make sure error object defined before access its message ↵Reed Feng2018-08-021-0/+13
| | | | (#1569)
* breaking: remove during, make test functions in until/whilst async (#1557)Alex Early2018-07-104-191/+23
| | | | | | | | * remove during, make test functions in until/whilst async * add during aliases fix docs * regenerate index
* feat: Iterable queues (#1556)Alex Early2018-07-091-0/+19
| | | | | | * feat: iterable queues * docs
* fix autoInject testsAlexander Early2018-07-082-75/+42
|
* prefer destructuringAlexander Early2018-07-0844-46/+46
|
* disallow variable shadowingAlexander Early2018-07-085-28/+27
|
* ES6-ify codebase (#1553)Alex Early2018-07-0846-1501/+1456
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cancelable foreach * cancelable waterfall * cancellable auto * fix lint * fix tests * cancelable whilst/until/during/forever * fix waterfall test. It WILL get there * docs * use rest params instead of slice * clean up internals * remove property func * clarify uses of createTester * happy path async funtions in asyncify * stop using arguments * DLL to class * moar arrows * fix merge issues * remove forOwn * moar arrows * fix merge mistake * even more arrows, what can stop him * mo more fn.apply(null,...) * remove more spurious uses of apply * update lint config * just when you thought there couldn't possibly be more arrows * use eslint:recommended * even less uses or aguments * get rid of prototype cuteness * fix concat tests * fix more tests
* limits of less than 1 are now an error (#1552)Alex Early2018-07-015-45/+45
| | | | | | * BREAKING CHANGE: limits of less than 1 are now an error * fix lint
* feat: Canceling flows (#1542)Alex Early2018-07-019-4/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cancelable foreach * cancelable waterfall * cancellable auto * fix lint * fix tests * cancelable whilst/until/during/forever * fix waterfall test. It WILL get there * docs * auto should not start other tasks once canceled * simplify waterfall, add test for arrays * simplify eachOf * cancelable retry * cancelable eachOf for arrays * revert test tweak
* Fix a memoize test caseSuguru Motegi2018-06-031-2/+2
|
* stop growlingAlexander Early2018-06-031-1/+0
|
* fix testsAlexander Early2018-06-021-2/+1
|
* move mocha_tests/ to test/Alexander Early2018-06-0249-0/+8216
|
* Get rid of nodeunitezubarev2016-05-062-30/+0
|
* Convert console functions tests to mochaezubarev2016-05-061-68/+0
|
* Convert apply/concat tests to mochaezubarev2016-05-061-84/+0
|