chore: add tests for metadata behavior #2563
chore: add tests for metadata behavior #2563maverick1872 wants to merge 5 commits intowinstonjs:masterfrom
Conversation
maverick1872
commented
Jul 28, 2025
- chore: introduce tests from issue/2029 #2284
- chore: update npm scripts
- chore: remove unused imports
- chore: update tests and breakout some for child loggers and metadata behavior
| assume(expectedOutput).eqls(actualLogOutput); | ||
| }); | ||
|
|
||
| it.skip("should allow overriding the parent's default metadata without affecting the parent", () => { |
There was a problem hiding this comment.
@DABH Started to go through the process of introducing tests from my other branch, independently of introducing fixes. This is when I remembered we use mocha as a test runner which unfortunately lacks the .failing behavior that's available in jest. This means for the tests that expected to fail due to a functionality gap I'm forced to make them be skipped like this one.
Curious on your thoughts on me opening a PR to replace mocha with jest as the test runner moving forward to enable access to this functionality and everything else provided by it?
There was a problem hiding this comment.
I am ok if you want to migrate us from mocha to jest - we’ve been using mocha for only historical purposes afaik, I’ve used jest in other projects. Don’t want to add more work to your plate haha but yeah feel free and thank you 😅
There was a problem hiding this comment.
(Though perhaps Claude Code etc. can now make things like mocha->jest migration trivial 😅🤖)
There was a problem hiding this comment.
It's actually a pretty low-effort migration I believe. If I'm not mistaken it should be just a transition of the test hooks (before/after) to (before[each/all]/after[each/all]). Will throw something together.
There was a problem hiding this comment.
Agree with you @DABH that claude will make what were previously long, tedious migrations such as mocha –> jest nearly trivial as these tools continue to mature in the market.
6970008 to
3e36321
Compare