Many "Inferno is in development mode" logs during testing
See original GitHub issueObserved Behaviour
When running tests that utilize Inferno as part of the framework, every test will log Inferno is in development mode. to the console. This is due to the NODE_ENV !== 'production' check in index.ts within Inferno.
This logging behavior, without an ability to stop it, pollutes test logs with these statements.
Expected Current Behaviour
I don’t know if there’s an exact specified behavior. Having a way to turn off these logs (without setting the whole process to ‘production’) would be helpful.
If this is a design choice, the options as far as I can tell are to:
- Add a new environment variable (or other setting) to disable Inferno log statements
- Detect a variable when this log should happen - to ensure it gets run when a “real” browser is running, and not a test suite.
- “Just deal with” extra log statements in various capacities
- Ask users to monkey patch
console.logto avoid extra logging - Ask users to switch test suites running to ‘production’
A few of the above are non-ideal, and I would argue switching test suite to production is just a bad idea.
Ideally, I think that an environment variable or environment detection makes the most sense.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:7 (7 by maintainers)
Top Related StackOverflow Question
Okay sure, would you like to send PR?
what about disabling the console log then?