From b0aaf54764204ad3dc2cae91091d8ca02a93c3b9 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 3 Nov 2020 17:04:30 +0300 Subject: [PATCH] more promise testing... Signed-off-by: Alex A. Naanou --- test.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test.js b/test.js index 1292be2..26501c1 100755 --- a/test.js +++ b/test.js @@ -106,6 +106,8 @@ var cases = test.Cases({ Promise: function(assert){ var p = assert(Promise.cooperative()) + assert(!p.isSet, '.isSet is false') + var RESOLVE = 123 var then @@ -113,13 +115,19 @@ var cases = test.Cases({ console.log('then') then = RESOLVE }) + assert(!p.isSet, '.isSet is false') + var fin p.finally(function(){ console.log('finally') fin = true }) + assert(!p.isSet, '.isSet is false') + + // XXX for some reason this does not resolve p... p.set(123) + assert(p.isSet, '.isSet') assert(then == RESOLVE, '.then(..)') assert(fin, '.finally(..)') },