Could it be because I am generating the warnings by printing directly to STDERR
Yes:
use strict; use warnings; use Test::More tests => 2; use Test::Warn; # Your code which gives an expected warning sub foo { warn "Stripe Webhook Error: Invalid Stripe Signature\n"; } sub bar { STDERR->print ("Stripe Webhook Error: Invalid Stripe Signature\n") +; } # Test your code warning_is { foo (); } "Stripe Webhook Error: Invalid Stripe Signature +\n", 'Invalid sig warning issued'; warning_is { bar (); } "Stripe Webhook Error: Invalid Stripe Signature +\n", 'Invalid sig STDERR print issued';
So don't do that. :-)
🦛
In reply to Re^5: STDERR in Test Results
by hippo
in thread STDERR in Test Results
by Bod
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |