aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_promise_spec.lua
Commit message (Collapse)AuthorAgeFilesLines
* util.promise: Fix field name in failing test (introduced in 2639e0e1c378)Matthew Wild2022-10-071-1/+1
|
* util.promise: Add some missing test cases (found through mutation testing)Matthew Wild2022-10-071-0/+25
|
* util.promise: Remove some redundant checks, add tests confirming redundancyMatthew Wild2022-10-071-0/+21
| | | | | | | | | This lines don't appear to do anything useful, and all tests pass when they are removed. Discovered via mutation testing. I added extra tests to exercise this code, because I wasn't certain that there were no side-effects caused by removal. Everything appears to be fine, thanks to the "pending" check at the start of promise_settle().
* util.promise: Fix testKim Alvefur2021-11-261-1/+1
| | | | | Could not reproduce locally but it complained in CI that > spec/util_promise_spec.lua:676: Cannot spy on type 'nil', only on functions or callable elements
* util.promise: Support delayed promise executionKim Alvefur2019-01-051-0/+14
|
* Fix various spelling errors (thanks codespell)Kim Alvefur2021-07-271-1/+1
| | | | | Also special thanks to timeless, for wordlessly reminding me to check for typos.
* util.promise: Switch order of parameters to join()Matthew Wild2021-03-251-2/+2
| | | | | This saves awkward fiddlery with varargs and also echoes the signature of pcall/xpcall.
* util.promise: all()/all_settled() pass through non-promise valuesMatthew Wild2021-03-251-0/+33
|
* util.promise: Add join() convenience methodMatthew Wild2021-03-251-0/+26
| | | | | | Usage: promise.join(p1, p2, function (result1, result2) [...] end)
* util.promise: Add support for arbitrary keys in all()/all_settled()Matthew Wild2021-03-251-0/+37
|
* util.promise: Add all_settled, which follows semantics of allSettled from ES2020Matthew Wild2020-06-081-0/+54
|
* util.promise: Add some additional tests to cover callback return valuesMatthew Wild2019-09-301-0/+24
|
* util.promise: Add tests ensuring returning a promise resolves the current ↵Matthew Wild2018-10-261-0/+49
| | | | promise with that promise
* util.promise tests: Fix declared but unused variablesMatthew Wild2018-10-251-2/+2
|
* util.promise: Fix missing parametersMatthew Wild2018-10-251-2/+28
|
* util.promise: Ensure chained promises always receive a value/rejection even ↵Matthew Wild2018-10-251-0/+37
| | | | if an intermediate promise has no handlers
* util.promise: Add promise.try()Matthew Wild2018-10-181-0/+51
|
* util.promise: Add promise:finally()Matthew Wild2018-10-181-0/+67
|
* util.promise: Add additional test for promise.reject()Matthew Wild2018-10-181-0/+6
|
* util.promise: Fix promise.reject() to return a rejected promise, and fix ↵Matthew Wild2018-10-181-1/+1
| | | | buggy test for it
* util.promise tests: Fix luacheck warningsMatthew Wild2018-10-101-7/+6
|
* util.promise: ES6-like API for promisesMatthew Wild2018-10-101-0/+262