UNPKG

ava

Version:

Node.js test runner that lets you develop with confidence.

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;