Update test name on tests-start, guard updateTestName against double-prefixing - #1535
Merged
NullVoxPopuli merged 3 commits intoJul 28, 2026
Merged
Conversation
When only the test-result event renames tests, live progress reporting (the tests-start event) still shows the unprefixed name, so a running test cannot be attributed to its partition/browser. Renaming on tests-start as well fixes that, and updateTestName now returns early if the name already carries the prefix so the two hooks do not stack prefixes. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Important
made with claude
I'm not an expert in this codebase, and could be way off base, and I apologize if this is a waste of time / completely wrong
At AuditBoard we've been carrying this as a local patch to ember-exam for a while and it seems worth upstreaming.
Problem
patchTestemOutputonly renames tests on thetest-resultevent. Anything consuming testem's live progress reporting (thetests-startevent) sees the unprefixed name, so a currently-running test can't be attributed to its partition/browser — which matters when tracking down which browser a hung or slow test belongs to.Changes
patchTestemOutputnow also subscribes totests-startand applies the same rename (guarded withtest?.name, since not everytests-startpayload has a name).updateTestNamereturns early if the name already contains theExam Partition/Browser Idprefix, so renaming on both events doesn't stack prefixes onto the same test object.Testing
Added unit tests to
tests/unit/testem-output-test.js:updateTestNameis idempotent for already-prefixed names (partition and browser variants)patchTestemOutput(with a stubbedTestemglobal) renames ontests-start, doesn't double-prefix on the subsequenttest-result, and tolerates atests-startpayload without a nameAll 12 tests in the module pass locally via
ember test --filter="patch-testem-output".🤖 Generated with Claude Code