File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ plan 12;
25
25
my $ pall = Promise . allof(@ p );
26
26
@ p [0 ]. keep (1 );
27
27
@ p [1 ]. break (" danger danger" );
28
- dies -ok { $ pall . result }, " result on broken all-Promise throws " ;
29
- is $ pall . status, Broken , " all-Promise was broken " ;
28
+ lives -ok { $ pall . result }, " result on broken all-Promise does not throw " ;
29
+ is $ pall . status, Kept , " all-Promise was kept " ;
30
30
}
31
31
32
32
{
Original file line number Diff line number Diff line change 1
1
use v6 ;
2
2
use Test ;
3
3
4
- plan 10 ;
4
+ plan 9 ;
5
5
6
6
{
7
7
my $ p1 = Promise . new ;
@@ -24,12 +24,11 @@ plan 10;
24
24
my $ pany = Promise . anyof($ p1 , $ p2 );
25
25
26
26
$ p2 . break (" oh noes" );
27
- dies-ok { $ pany . result }, " Getting result of broken anyof dies" ;
28
- is $ pany . status, Broken, " Promise was broken" ;
29
- is $ pany . cause. message, " oh noes" , " breakage reason conveyed" ;
27
+ lives-ok { $ pany . result }, " Getting result of anyof where on Promise broke lives" ;
28
+ is $ pany . status, Kept, " Promise from anyof was kept" ;
30
29
31
30
$ p1 . keep (1 );
32
- is $ pany . status, Broken , " Other promise keeping doesn't affect status" ;
31
+ is $ pany . status, Kept , " Other promise keeping doesn't affect status" ;
33
32
}
34
33
35
34
throws-like { Promise . anyof(42 ) }, X::Promise::Combinator ;
You can’t perform that action at this time.
0 commit comments