Skip to content

Clean shared components test log#32759

Closed
florianduros wants to merge 2 commits into
developfrom
florianduros/log-test-shared-components
Closed

Clean shared components test log#32759
florianduros wants to merge 2 commits into
developfrom
florianduros/log-test-shared-components

Conversation

@florianduros

Copy link
Copy Markdown
Member

This PR fixes:

  • The spam Loading language from in shared component test
  • The log [Error: ResizeObserver loop completed with undelivered notifications.] was appearing on room list primary filter tests


async function getLanguage(langPath: string): Promise<ICounterpartTranslation> {
console.log("Loading language from", langPath);
if (process.env.NODE_ENV !== "test") console.log("Loading language from", langPath);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this is not a great approach, the test should define the console logs it doesn't care about and ignore. In certain tests this being spammed may be a red flag one wouldn't want to hide and cannot mutate the environment variable without breaking other things

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm a solution is to add a env var to disable log related to language in SC tests. But enabled the log in i18n tests of SC

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree, if our types were correct env would be inaccessible due to it being part of the node types and SC isn't designed for node but for the web.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you suggest as solution?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Like I stated initially

IMO this is not a great approach, the test should define the console logs it doesn't care about and ignore.

https://github.com/search?q=repo%3Aelement-hq%2Felement-web%20filterConsole&type=code

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep but this is spamming in all SC tests:

  • we add the filter in every testsuite except i18n -> kind of burden to do it
  • we put it globally in SC tests -> we lose this log in i18n

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we put it globally in SC tests -> we lose this log in i18n

Which is what this PR does already given it uses NODE_ENV which is the same for all tests

@Half-Shot Half-Shot removed their request for review April 24, 2026 09:53
@florianduros florianduros marked this pull request as draft May 7, 2026 09:04
@MidhunSureshR MidhunSureshR removed their request for review June 8, 2026 09:39
@florianduros

Copy link
Copy Markdown
Member Author

Replaced by #34184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants