Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for #1573 #1580

Closed
wants to merge 1 commit into from
Closed

Fix for #1573 #1580

wants to merge 1 commit into from

Conversation

alfeg
Copy link

@alfeg alfeg commented Nov 6, 2021

This PR closes #1573

Simple fix is suggested by @igvnv #1573 (comment)

This should cleanup console output during jest test run.

Simple fix suggested by @igvnv infernojs#1573 (comment)

This should cleanup console output during jest test run.

Jest runner ensure that `process.env.NODE_ENV` is set to `test`
@Havunen
Copy link
Member

Havunen commented Nov 7, 2021

Hmm, did you try this actually works? When inferno is bundled then those process env node env checks are replaced/removed

@alfeg
Copy link
Author

alfeg commented Nov 8, 2021

Yeah my bad, Haven't checked actual output. Seems to be much more problematic. Sorry.

Those output messages are literally pollute tests output.

@igvnv
Copy link
Contributor

igvnv commented Nov 8, 2021

I have prepared my PR for fix this issue and found his way:

// This message informs developers that they are using development mode (can happen
// in production because of bundling mistakes) and, therefore, Inferno is slower
// than in production mode. Skipping the notification for testing mode to keep testing
// console clear.
const testingEnv = process.env.JEST_WORKER_ID !== undefined;

if (process.env.NODE_ENV !== 'production' && !testingEnv) {

@Havunen
Copy link
Member

Havunen commented Nov 8, 2021

Yeah @igvnv that could work, can you open PR for it please :)

@igvnv
Copy link
Contributor

igvnv commented Nov 8, 2021

@Havunen to be honest, I little shy :) Is it OK to support Jest only? I am afraid that I have no time to test other popular testing libraries.

@Havunen
Copy link
Member

Havunen commented Nov 8, 2021

Is it OK to support Jest only

Yeah I think this is jest only problem, because it bundles tests to multiple files and adds all dependencies to each file. Jasmine and mocha at least works without an issue

@Havunen Havunen closed this Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Many "Inferno is in development mode" logs during testing
3 participants