use strict;
use warnings;
use Role::Tiny;
use Test::More;
use Test::Deep qw( cmp_deeply );
sub json_deeply {
my ( $t, $ptr, $expect, $desc ) = @_;
# Pointer is an optional argument
if
a simple scalar (did you mean to use json_is()?)"
if !ref $expect;
$desc ||= qq{deeply match JSON Pointer "$ptr"};
my $given = $t->tx->res->json( $ptr );
local $Test::Builder::
t::Builder::Level + 1;
my $result = cmp_deeply( $given, $expect, $desc )
or diag "Got JSON: ", explain $given;
return $t->success( $result );
}
sub text_deeply {
my ( $t, $sel, $