Closed henry039 closed 3 years ago
I am not sure how to add unit test for cli.js
Try to using const { spawn } = require('child_process');
but fail to mock lib module
Why would you need to mock lib?
don't worry about the tests, there are none for the CLI
Waiting for @delvedor (who works for Elastic)
enable CLI to read config file
Usage:
node ./index.js | tee -a ./pino_log/http.log | jq -c 'del(.req.headers) | del(.http.response.headers) | del(.redact)' | pino-elasticsearch -r config.json