Commit | Line | Data |
---|---|---|
2ae2f22a CG |
1 | use strict; |
2 | use warnings; | |
3 | ||
4 | use Test2::Tools::Tiny; | |
5 | ||
6 | use Test2::API qw{ | |
7 | intercept | |
8 | test2_enable_trace_stamps | |
9 | test2_disable_trace_stamps | |
10 | test2_trace_stamps_enabled | |
11 | }; | |
12 | ||
13 | test2_enable_trace_stamps(); | |
14 | my $events = intercept { | |
15 | ok(1, "pass"); | |
16 | }; | |
17 | ok($events->[0]->facet_data->{trace}->{stamp}, "got stamp"); | |
18 | ||
19 | test2_disable_trace_stamps(); | |
20 | $events = intercept { | |
21 | ok(1, "pass"); | |
22 | }; | |
23 | ok(!exists($events->[0]->facet_data->{trace}->{stamp}), "no stamp"); | |
24 | ||
25 | done_testing; |