Write tests for the Logger parts
Closed this issue ยท 2 comments
kptdobe commented
Those 4 files has no corresponding tests:
- logger.js
- logger-coralogix.js
- logger-papertrail.js
- syslog-stream.js
Considering the complexity of the embedded MultiLogger(s) structure, those tests are mandatory to understand how this is supposed to work (what kind of logger can you provide to #wrap
?!) and make sure we do not break something when changing the current code.
I tried to write some but I finally gave up because I am really not sure how this is supposed to work.
tripodsan commented
it's written in the jsdoc:
/**
* Wraps a main openwhisk function and intitializes logging.
* it also creates a bunyan logger and binds it to the `__ow_logger` params.
*
* @param {Function} fn - original openwhisk action main function
* @param {*} params - openwhisk action params
* @param {MultiLogger} [logger=rootLogger] - a helix multi logger. defaults to the helix
* `rootLogger`.
* @returns {*} the return value of the action
*/
async function wrap(fn, params = {}, logger = rootLogger) {
but I will write some tests.... ;-)
adobe-bot commented
๐ This issue has been resolved in version 2.4.0 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐