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

Ensure exit code is correct for ember test with failing tests. #1123

Merged
merged 1 commit into from
Jun 21, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* [BUGFIX] Display message to user when diff cannot be applied cleanly [1091](https://github.com/stefanpenner/ember-cli/pull/1091)
* [ENHANCEMENT] Notify when an ember-cli update is available, and add `ember update` command. [#899](https://github.com/stefanpenner/ember-cli/pull/899)
* [BUGFIX] Ensure that build output directory is cleaned up properly. [#1122](https://github.com/stefanpenner/ember-cli/pull/1122)
* [BUGFIX] Ensure that non-zero exit code is used when running `ember test` with failing tests. [#1123](https://github.com/stefanpenner/ember-cli/pull/1123)

### 0.0.36

Expand Down
7 changes: 6 additions & 1 deletion lib/commands/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ module.exports = Command.extend({
.then(function() {
return test.run(testOptions);
})
.finally(this.rmTmp.bind(this));
.finally(this.rmTmp.bind(this))
.then(function(exitCode) {
process.addListener('exit', function() {
process.exit(exitCode);
});
});
}
}
});
4 changes: 2 additions & 2 deletions lib/tasks/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ module.exports = Task.extend({
var testem = new Testem();

return new Promise(function(resolve) {
testem.startCI(testemOptions, function() {
resolve();
testem.startCI(testemOptions, function(exitCode) {
resolve(exitCode);
});
});
},
Expand Down