Animate your nyan mocha reporter
Just put the following code outside any test cases or describe directives:
afterEach(function (done) {
setTimeout(done, 30);
});
Enjoy :)
Bonus code of how I created this GIF (Jiff):
var shots = 0;
afterEach(function (done) {
shots++;
shotsString = (shots < 10 ? '0' : '') + shots;
exec('screencapture -T0x /Users/robin/capture_' + shotsString + '.png', function (err, stdout, stderr) {
setTimeout(done, 30);
});
});
I then used mogrify to crop all the screen captures to the region where my terminal was on my screen
mogrify -path ./cropped -crop 955x533+199+234 capture*.png
I then used convert to mash it into a GIF and crop it further
convert -crop 700x420+0+23\! +repage -delay 0 -loop 0 *.png nyan.gif
Written by Robin Duckett
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Tdd
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#