MCPcopy
hub / github.com/css/csso / runDebug

Function runDebug

test/compress.js:155–169  ·  view source on GitHub ↗
(css, options)

Source from the content-addressed store, hash-verified

153
154 describe('debug option', () => {
155 function runDebug(css, options) {
156 const output = [];
157 const tmp = console.error;
158
159 try {
160 console.error = (...args) => {
161 output.push(args.join(' '));
162 };
163
164 minify(css || '', options);
165 } finally {
166 console.error = tmp;
167 return output;
168 }
169 }
170
171 it('should output nothing to stderr if debug is not set', () => {
172 assert(runDebug('.foo { color: red }').length === 0);

Callers 1

compress.jsFile · 0.85

Calls 1

minifyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…