(css, options)
| 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); |
no test coverage detected
searching dependent graphs…