Added feature that Test::JSV::Suite passes each test case to callback as forth argument.
Because callback can handle testing by test case. For example,
my $validator = JSV::Validator->new;
Test::JSV::Suite->run(
base_dir => "/path/to/dir",
suite => "/path/to/suite.json",
cb => sub {
my ($schema, $instance, $expect, $test_case) = @_;
## for backward compatibility, testing forth argument
if (defined $test_case && $test_case->{db}) {
$DB::single = 1;
}
return $validator->validate($schema, $instance);
}
);
Added feature that Test::JSV::Suite passes each test case to callback as forth argument. Because callback can handle testing by test case. For example,