Skip to content
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

Cannot contain bindings #15

Open
maou-shonen opened this issue Jun 22, 2024 · 1 comment
Open

Cannot contain bindings #15

maou-shonen opened this issue Jun 22, 2024 · 1 comment

Comments

@maou-shonen
Copy link

I don't understand why this won't pass.

import pinoTest from "pino-test"
import { pino } from "pino"

const stream = pinoTest.sink()
const logger = pino(stream)

logger.info({ foo: "bar" }, "hello world")
await pinoTest.once(stream, { msg: "hello world", level: 30 }) // thorw error

shouldn't they have the same msg?

logger.info(msg)
logger.info(bindings, msg)
@ruddenchaux
Copy link
Contributor

You are logging the object {foo: "bar"} without expect it. You should assert it with await pinoTest.once(stream, { msg: "hello world", level: 30, foo: "bar" }).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants