UNPKG

ava

Version:

Testing can be a drag. AVA helps you get it done.

14 lines (12 loc) 203 B
'use strict'; function whileCorked(stream, fn) { return function (...args) { stream.cork(); try { fn.apply(this, args); } finally { stream.uncork(); } }; } module.exports = whileCorked;