This all seems like overkill to me. All we really need to know is if `chslk.yellow()` or `chalk.red()` is called. You can do that like this inside a test:

```
var chalk = require("chalk");
var spy = sinon.spy(chalk, "yellow");

// do stuff

assert(spy.calledOnce);
```

You should probably create a sinon sandbox and call verifyAndRestore() in befireEach() as well. See https://github.com/eslint/eslint/blob/4ae37560f3727c2a981f30744a195008391e49e0/tests/lib/eslint.js#L80