Created
August 15, 2011 21:32
-
-
Save michaelsbradleyjr/1147919 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Modern::Perl; | |
use Term::ANSIColor qw( :constants ); | |
use IPC::Run3; | |
use Capture::Tiny qw( tee ); | |
my @cmd = qw( node t/index.js ); | |
my ($stdout, $stderr) = tee { | |
run3 \@cmd; | |
}; | |
if ($stdout =~ m/\s-.+fail/) { | |
print STDERR RED, "one or more tests failed!"; | |
die RESET, "\n"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment