ValentinH / jest-fail-on-console

Utility to make jest tests fail when console.error() or any other methods are used
MIT License
141 stars 20 forks source link

Add support for passing group context to `silenceMessage` #37

Closed lennym closed 1 year ago

lennym commented 1 year ago

If a message is contained within a console.group or console.groupCollapsed call then track this context and provide to implementations of silenceMessage.

Because groups can be recursively nested, track both the parent group and the full group stack.

ValentinH commented 1 year ago

One test is failing though.

lennym commented 1 year ago

I forgot to add the files! 🤦

Should be ok now.

ValentinH commented 1 year ago

Thanks for this contribution. I'll publish the new version as soon as I'm on the computer.

lennym commented 1 year ago

Fantastic! Thank you so much for your help.

ValentinH commented 1 year ago

Published as https://github.com/ValentinH/jest-fail-on-console/releases/tag/v3.1.0