-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to expect pino to not be called? #18
Labels
good first issue
Good for newcomers
Comments
I would try with |
Thanks @mcollina, it failes on time out. I think there's room to support something like:
|
It's a good PR to make! |
A new const func = (b, logger) => {
if (b === true) {
logger.info("b is true");
}
}
test('should never log', () => {
const stream = pinoTest.sink()
const instance = pino(stream)
func(false, instance)
assert.strictEqual(stream.readableLength, 0, 'Stream should not have received any logs')
}) |
Sounds awesome @ruddenchaux! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Side note: Finally! Great addition to pino!
Question: How could I check that pino was not called at all when calling
func(false, logger)
?The text was updated successfully, but these errors were encountered: