Skip to content

Conversation

@Krinkle
Copy link
Member

@Krinkle Krinkle commented Apr 27, 2023

This is in preparation for QUnit 3 where we'd like to make it possible to enable this on Node.js, not just in browsers.

For now it remains unconditionally enabled, and limited to browsers by virtue of using window.performance. The reason we don't enable it unconditionally is due to its overhead and that it should remain opt-in for QUnit CLI.

I'm still gathering feedback, but it's possible we'll make it opt-in for browsers as well, depending how significant the overhead is and how often people use this.

Another way might be to leave it on by default when using the HTML reporter, but that when someone configures the list of reporters explicitly (e.g. to enable "TAP" in the browser for a CI pipeline) to then automatically turn off any default reporters ("html" and "perf").

In other words, the default is html+perf, and we could offer a way in QUnit.config to enable tap declaratively in a way that, if you want to also have the html reporter, you have to list it explicitly.

Feedback welcome here, or at #1498.

@Krinkle Krinkle changed the title Core: Introduce QUnit.reporters.perf (factor PerfReporter from suit… Core: Add QUnit.reporters.perf (factor PerfReporter from suit… Apr 27, 2023
@Krinkle Krinkle changed the title Core: Add QUnit.reporters.perf (factor PerfReporter from suit… Core: Add QUnit.reporters.perf (factor PerfReporter from suite.js) Apr 27, 2023
No longer dynamically enumerate reporters, which would include
the newly added invisible "perf" reporter that is currently
browser-only.
@Krinkle Krinkle merged commit 0d034a1 into main May 29, 2023
@Krinkle Krinkle deleted the perf-rep branch May 29, 2023 09:47
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.

2 participants