Branch Coverage

lib/PAGI/Test/WebSocket.pm
Criterion Covered Total %
branch 22 36 61.1


line true false branch
13 0 14 unless $args{'app'}
14 0 14 unless $args{'scope'}
35 12 19 unless ($self->{'_connect_sent'})
41 0 19 if (@{$self->{'send_queue'};})
46 0 19 if ($self->{'closed'})
60 14 14 if ($event->{'type'} eq 'websocket.accept') { }
11 3 elsif ($event->{'type'} eq 'websocket.send') { }
2 1 elsif ($event->{'type'} eq 'websocket.close') { }
82 0 14 unless $self->{'accepted'}
99 0 34 if ($self->{'closed'} and @{$self->{'_pending_receives'};})
109 1 7 if $self->{'closed'}
125 0 1 if $self->{'closed'}
154 10 0 if ($event->{'type'} eq "websocket.send" and exists $event->{'text'})
161 0 1 if $self->{'closed'}
174 1 0 if ($event->{'type'} eq "websocket.send" and exists $event->{'bytes'})
181 0 0 if $self->{'closed'}
191 0 2 unless defined $text
200 0 12 if $self->{'closed'}