Branch Coverage

blib/lib/Mojo/Transaction/WebSocket.pm
Criterion Covered Total %
branch 55 58 94.8


line true false branch
17 115 46 if ref $frame ne "HASH"
20 12 149 if exists $frame->{'json'}
23 132 29 if (exists $frame->{'text'}) { }
27 153 8 unless $self->compressed
42 119 14 $self->{'close'} ? :
43 15 118 @args > 1 ? :
52 24 130 $close->[0] ? :
53 16 138 if defined $close->[1]
73 1 258 if $op == 9
74 1 257 if $op == 10
77 93 164 if ($op == 8)
78 80 13 unless length $frame->[5] >= 2
83 157 7 unless exists $self->{'op'}
86 1 163 if length $self->{'message'} > $max
89 7 156 unless $frame->[0]
93 6 0 if ($self->compressed and $self->{'pmc'})
97 1 5 if length $msg
101 7 148 if $self->has_subscribers("json")
103 132 23 $op == 1 ? :
104 51 0 $op == 1 ? :
51 104 if $self->has_subscribers("message")
114 106 0 if $_[0]->handshake->resume
118 56 261 if $cb
119 156 161 unless ref $msg eq "ARRAY"
130 2 253 unless ref $frame
139 571 308 unless length($self->{'write'} //= "")
140 200 368 if not length $self->{'write'} and $self->{'closing'}
148 3 17 if ($self->req->headers->sec_websocket_extensions // "") =~ /permessage-deflate/u
156 3 3 unless defined(my $proto = &first(sub { $protos{$_}; } , @_))