This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
cpan/Test-Simple - Update to version 1.302197
[perl5.git] / cpan / Test-Simple / t / Test2 / behavior / trace_stamps.t
CommitLineData
2ae2f22a
CG
1use strict;
2use warnings;
3
4use Test2::Tools::Tiny;
5
6use Test2::API qw{
7 intercept
8 test2_enable_trace_stamps
9 test2_disable_trace_stamps
10 test2_trace_stamps_enabled
11};
12
13test2_enable_trace_stamps();
14my $events = intercept {
15 ok(1, "pass");
16};
17ok($events->[0]->facet_data->{trace}->{stamp}, "got stamp");
18
19test2_disable_trace_stamps();
20$events = intercept {
21 ok(1, "pass");
22};
23ok(!exists($events->[0]->facet_data->{trace}->{stamp}), "no stamp");
24
25done_testing;