Debian Codegraph @

t/integration/stamps.t

raw
1 use Test2::V0;
2
3 use File::Temp qw/tempdir/;
4 use File::Spec;
5
6 use App::Yath::Tester qw/yath/;
7 use Test2::Harness::Util::File::JSONL;
8
9 use Test2::Harness::Util::JSON qw/decode_json/;
10
11 my $dir = __FILE__;
12 $dir =~ s{\.t$}{}g;
13 $dir =~ s{^\./}{};
14
15 yath(
16 command => 'test',
17 args => [$dir, '--ext=tx', '-A', '--no-plugins', '-pTestPlugin', '-v'],
18 exit => T(),
19 log => 1,
20 test => sub {
21 my $out = shift;
22
23 while (my @events = $out->{log}->poll()) {
24 for my $event (@events) {
25 last unless $event;
26 ok($event->{stamp}, "Event had a timestamp");
27 }
28 }
29 },
30 );
31
32 done_testing;