From 5aa68a22458cdc77443d44d6b923e61de0fdac8d Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 31 May 2025 09:48:06 +0100 Subject: Add test for using also multiple times --- test/promises.tests.js | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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 + }); + }); } }); -- cgit v1.2.3