Debian Codegraph @

cli-color/test/_lib/supports-color-wrapper.js

raw
1 "use strict";
2 var supportsColor = require("../../lib/supports-color");
3
4 // a wrapper function which automatically forces color mode to enabled during the tests.
5 module.exports = function (fn) {
6 return function (t, a) {
7 supportsColor.enableColor();
8 try { return fn(t, a); }
9 finally { supportsColor.autoDetectSupport(); }
10 };
11 };