We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f838890 + 073c878 commit ebf1db7Copy full SHA for ebf1db7
t/websocket-client.t
@@ -155,8 +155,7 @@ END { $https-server.stop }
155
156
my $p = Promise.new;
157
$connection.messages.tap(-> $mess {
158
- ok (await $mess.body-text).starts-with('You said:');
159
- $p.keep;
+ $p.keep: await $mess.body-text
160
});
161
162
$connection.send('Hello');
@@ -166,7 +165,10 @@ END { $https-server.stop }
166
165
167
await Promise.anyof($p, Promise.in(5));
168
169
- unless $p.status ~~ Kept {
+ if $p.status ~~ Kept {
+ ok $p.result.starts-with('You said:'), "Got expected reply";
170
+ }
171
+ else {
172
flunk "send does not work";
173
}
174
0 commit comments