diff options
| author | Michael Williamson <mike@zwobble.org> | 2025-05-31 09:48:06 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-09-16 23:38:38 +0100 |
| commit | 5aa68a22458cdc77443d44d6b923e61de0fdac8d (patch) | |
| tree | aedbba43c6527f0848d306f27c387217bf0cd1cc | |
| parent | 64d0ed6e293f2a3a7ed2c3be97a805f02724693d (diff) | |
Add test for using also multiple times
| -rw-r--r-- | test/promises.tests.js | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/test/promises.tests.js b/test/promises.tests.js index 05b27d0..a6e35ac 100644 --- a/test/promises.tests.js +++ b/test/promises.tests.js @@ -110,5 +110,25 @@ test("props", { b: 2 }); }); + }, + + "also can be used multiple times": function() { + return promises.props({ + a: promises.resolve(1) + }).also(function(result) { + return { + b: result.a + 1 + }; + }).also(function(result) { + return { + c: result.b + 1 + }; + }).then(function(result) { + assert.deepStrictEqual(result, { + a: 1, + b: 2, + c: 3 + }); + }); } }); |
