aboutsummaryrefslogtreecommitdiff
path: root/test/promises.tests.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/promises.tests.js')
-rw-r--r--test/promises.tests.js20
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
+ });
+ });
}
});