Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Keep autotesting until all tests have passed #251

merged 2 commits into from

2 participants


There are cases where there are broken tests in a spec, but they don't get run after fixing tests in a different spec. This leads to the latest result being green, even though there are failing tests.


What's the scenario here?


  • A.spec.js
  • B.spec.js

Test Results

Here is what I believe current functionality does:

Run Iteration Test Result
1 Failure in A, B Passes Full Run
2 Change in A, A Passes, no change in B Full Run
3 Change in A, A Passes, no change in B A is Run, but not B
4 Change in A, B is Failing but not change in B A is Run, but not B

Is 4 the case that is an issue? And is that what this PR is intended to fix?


Yes, it also occurs if you change file C which doesn't have a corresponding spec.

I'm assuming that the intended behaviour is that the latest test run shows the status of the entire suite, even if it didn't run the entire suite.


I believe the original intent was to run only the broken spec until the broken spec was fixed, then re-run the entire suite. But that may not be happening. Is that what you're seeing?

@tebriel tebriel merged commit d32678c into mhevery:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 19, 2013
  1. @notclive
  2. @notclive

    Fix typo

    notclive authored
This page is out of date. Refresh to see the latest.
Showing with 7 additions and 6 deletions.
  1. +7 −6 lib/jasmine-node/autotest.js
13 lib/jasmine-node/autotest.js 100644 → 100755
@@ -27,14 +27,16 @@ var run_external = function(command, args, callback) {
+var last_run_successful = false;
var run_everything = function() {
// run the suite when it starts
var argv = [].concat(baseArgv);
- run_external(argv.shift(), argv);
+ run_external(argv.shift(), argv, function (code) {
+ last_run_successful = code === 0
+ });
-var last_run_succesful = true;
exports.start = function(loadpaths, watchFolders, patterns) {
var watchPatterns;
@@ -60,12 +62,11 @@ exports.start = function(loadpaths, watchFolders, patterns) {
run_external(argv.shift(), argv, function(code) {
// run everything if we fixed some bugs
if(code == 0) {
- if(!last_run_succesful) {
+ if(!last_run_successful) {
- last_run_succesful = true;
} else {
- last_run_succesful = false;
+ last_run_successful = false;
Something went wrong with that request. Please try again.