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

feat: disable html reporter entirely for headless CI #1711

Open
runspired opened this issue Feb 15, 2023 · 4 comments
Open

feat: disable html reporter entirely for headless CI #1711

runspired opened this issue Feb 15, 2023 · 4 comments
Labels

Comments

@runspired
Copy link

memory growth over time for the html reporter still occurs even when hidepassed is true as the hidden DOM nodes are retained. For test suites with massive quantities of tests this can have a significant effect.

@Krinkle
Copy link
Member

Krinkle commented Feb 15, 2023

@runspired Can you try removing the <div id="qunit"> element? That should effectively disable the HTML Reporter. I'm hoping in QUnit 3 to offer a configuration option like QUnit.config.reporters where you could explicitly add/replace the reporter, e.g. using HTML+TAP, or TAP only when using a CI listener/aggregator.

@runspired
Copy link
Author

I ended up using pnpm patch to rewrite a small bit to enable this. Can put up a PR with that if you're interested, more just to see than to push forward.

@Krinkle
Copy link
Member

Krinkle commented Feb 16, 2023

@runspired Are you using an additional package for this? The HTML Reporter element is populated, but not created, by QUnit. It is typically declared in your test.html file, or equivalent as generated by a higher-level test runner (like karma-qunit).

As mentioned, we'll make this easier in the next release, but I'm checking to make sure I understand what you needed to patch and whether there's a way I can document today that doesn't involve a patch.

@runspired
Copy link
Author

We're using it with testem and ember. The same html file gets re-used in both CI and browser. We could potentially find a way to juggle the launch file, but it's a bit hefty and I think the easier lift for us is going to be to either upstream the ability to disable it (as we've found this useful even in-browser for memory-leak testing) or to continue patching (it's a fairly tiny patch).

@Krinkle Krinkle added Component: HTML Reporter Component: Core For module, test, hooks, and runner. labels Mar 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants