Report a failing Ember suite instead of exiting the process - #660
Merged
Conversation
tricknotes
force-pushed
the
fix-ember-test-exit
branch
2 times, most recently
from
September 4, 2026 08:54
43826fa to
1187595
Compare
`Shell#test` ran `ember test` through `Runner#run!`, which exits the calling process when the command fails. `App#test` therefore could never return the `false` its `success?` call promises: any consumer running the suite from Ruby — RSpec included — was terminated mid-run, with an exit and a partial summary instead of a test failure. Run the suite with `Runner#run` and return the status, so `App#test` reports the outcome to its caller. `EmberCli.test!` now raises `EmberCli::TestFailureError` when a suite fails, so library consumers can rescue the failure in Ruby, while the exception still exits `rake ember:test` nonzero. `Runner#run!` keeps its exiting behavior for `compile` and `install`, whose rake tasks rely on it. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
tricknotes
force-pushed
the
fix-ember-test-exit
branch
from
September 4, 2026 08:58
1187595 to
3b29ce2
Compare
This was referenced Sep 4, 2026
Merged
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.
Summary
Shell#testranember testthroughRunner#run!, which callsexitwhen the command fails.App#testtherefore could never return thefalseitssuccess?call promises: any consumer running the suite from Ruby was terminated mid-run.The gem's own RSpec suite is such a consumer — when the
EmberCli::App#testexample'sember testrun fails (e.g. no Chrome available), the whole RSpec process exits at that point, reporting however many examples had run so far with0 failures. Observed as example counts varying between 2 and 103 across runs of the same revision.Changes:
Shell#testruns the suite withRunner#runand returns the status, soApp#testreports the outcome to its callerEmberCli.test!raisesEmberCli::TestFailureError(naming the failing application) when a suite fails, so library consumers can rescue the failure in Ruby instead of having their process terminated; the exception still exitsrake ember:testnonzeroRunner#run!keeps its exiting behavior forcompileandinstall, whose rake tasks rely on it (its spec documents theSystemExit)Shell#test(both outcomes) andEmberCli.test!(runs every suite; raises on failure), and a CHANGELOG entryVerification
spec/libnow runs to completion deterministically: the same example count on every run (previously the count varied per seed), with the one genuine failure on this machine being the Chrome-dependentApp#testexample — reported as a failure instead of aborting the suite