cli-color/test/lib/supports-color.js
raw| 1 | "use strict"; |
| 2 | var wrapper = require("../_lib/supports-color-wrapper"); |
| 3 | |
| 4 | module.exports = wrapper(function (t, a) { |
| 5 | t.enableColor(); |
| 6 | a(t.isColorSupported(), true, "Enable color support NO_COLOR"); |
| 7 | t.disableColor(); |
| 8 | a(t.isColorSupported(), false, "Disable color support NO_COLOR"); |
| 9 | t.autoDetectSupport(); |
| 10 | a(t.isColorSupported(), !process.env.NO_COLOR, "use NO_COLOR env variable"); |
| 11 | }); |