Skip to content

test: add unit tests for ConsoleRuntimeLogger and InMemoryRuntimeLogger (Issue #111) - #198

Open
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-111-logger-unit-tests
Open

test: add unit tests for ConsoleRuntimeLogger and InMemoryRuntimeLogger (Issue #111)#198
rafaio1 wants to merge 1 commit into
Lilly-Protocol:mainfrom
rafaio1:bounty/issue-111-logger-unit-tests

Conversation

@rafaio1

@rafaio1 rafaio1 commented Aug 26, 2026

Copy link
Copy Markdown

Summary

Adds comprehensive unit tests for both ConsoleRuntimeLogger and InMemoryRuntimeLogger, covering level correctness, metadata handling, insertion order, and console delegation.

Tests Added

  • ✅ InMemoryRuntimeLogger records info/error entries with correct level and message
  • ✅ Metadata preserved when provided, undefined when omitted
  • ✅ Insertion order maintained across mixed calls
  • ✅ ConsoleRuntimeLogger delegates to console.info/console.error correctly
  • ✅ Empty object passed as metadata fallback for console.error

Verification

All 8 tests pass locally via npx vitest run tests/logger/runtime-logger.test.ts.

Closes #111

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.

[Bounty: $70] Add unit tests for ConsoleRuntimeLogger and InMemoryRuntimeLogger

1 participant