Skip to content

chore(rstest-example): avoid logging undefined metadata in mocking example#418

Merged
9aoy merged 1 commit intomainfrom
9aoy/fix-mocking-logger-metadata-output
Apr 8, 2026
Merged

chore(rstest-example): avoid logging undefined metadata in mocking example#418
9aoy merged 1 commit intomainfrom
9aoy/fix-mocking-logger-metadata-output

Conversation

@9aoy
Copy link
Copy Markdown
Contributor

@9aoy 9aoy commented Apr 8, 2026

Summary

  • avoid passing undefined metadata to console.debug/info/warn/error in the rstest/mocking logger example
  • keep log output clean when callers only provide a message

Why

The example printed output like [Test] Test message undefined because the logger always forwarded the optional metadata argument as a second console parameter, even when it was not provided.

Impact

This keeps the example focused on the mocking behavior and removes confusing noise from test output.

Validation

  • pnpm test in rstest/mocking

@9aoy 9aoy changed the title [codex] avoid logging undefined metadata in mocking example chore(rstest-example): avoid logging undefined metadata in mocking example Apr 8, 2026
@9aoy 9aoy marked this pull request as ready for review April 8, 2026 08:53
@9aoy 9aoy merged commit 0246884 into main Apr 8, 2026
4 checks passed
@9aoy 9aoy deleted the 9aoy/fix-mocking-logger-metadata-output branch April 8, 2026 09:00
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

Successfully merging this pull request may close these issues.

1 participant