Skip to content

test(nest-logger): add regression tests for NestLogger argument forwarding#81

Closed
Copilot wants to merge 2 commits into#79-nest-loggerfrom
copilot/sub-pr-80
Closed

test(nest-logger): add regression tests for NestLogger argument forwarding#81
Copilot wants to merge 2 commits into#79-nest-loggerfrom
copilot/sub-pr-80

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 19, 2026

NestLogger previously passed optional params as a nested array to the underlying @shiftcode/logger (e.g. error('msg', 'trace', 'ctx')args: [['msg', 'trace', 'ctx']]). The fix was applied in #80, but no tests guarded against recurrence.

Changes

  • src/model/nest-logger.spec.ts (new) — Unit tests for all five NestLogger methods (error, warn, log, debug, verbose), each asserting arguments arrive as a flat array at the transport layer:
nestLogger.error('msg', 'trace', 'ctx')
expect(transport.logArgs!.args).toEqual(['msg', 'trace', 'ctx']) // not [['msg', 'trace', 'ctx']]
  • test/mock-log.transport.ts — Replaced logArgs: any with a typed MockLogArgs interface, eliminating unsafe member access lint errors surfaced by the new tests.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: dario-fazio <207528194+dario-fazio@users.noreply.github.com>
Copilot AI changed the title [WIP] [WIP] Address feedback on unhandled errors logging in Nest logger test(nest-logger): add regression tests for NestLogger argument forwarding Mar 19, 2026
Copilot AI requested a review from dario-fazio March 19, 2026 16:33
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.

2 participants