ValentinH / jest-fail-on-console

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

Incompatible with Jest's injectGlobals: false #41

Open thewilkybarkid opened 1 year ago

thewilkybarkid commented 1 year ago

We use the injectGlobals: false in a TypeScript project to avoid having to depend on the @types/jest library. I want to use this library to prevent unexpected console logging, but it's incompatible as it relies on the injected globals (looks like afterEach, beforeEach, and expect).

ValentinH commented 1 year ago

I see, would you like to make a PR to use @jest/globals ?