Open KyleW opened 4 years ago
I agree that the logging of the describe blocks are annoying.
An alternative solution to the silentMode flag would be to send the logger (log
) to getFilesForDescriptions
and have it use that instead of calling console.log
. Then the describe blocks can be printed using log.debug()
. Anyone interested in that output can simply increase the loglevel.
I like that Idea better. I'll switch it to using log.debug.
I looked into it and log.debug
doesn't seem to be an option without a bigger refactor. Currently, the library doesn't use a logger other than what comes with node. As far as I can tell, there's nothing like log.debug
available. I'd have to add winston or something to get log levels and even then I think I'd need to expose a log level flag.
I could switch from console.log
to console.debug
, but I believe those do exactly the same thing. 🤷♂
Adds a silent mode. When silentMode is true, it skips the logging when mapping describe blocks to filenames.
SilentMode defaults to false so existing users should not see a change.