protractor_spec.js
function(testPath) {
      return browser.navigate()
          .to(TEST_SERVER + '/' + testPath)
          .then(function() {
            return waitForTestSuiteCompletion(testPath);
          })
          .then(function(status) {
            if (!status.isSuccess) {
              failureReports.push(status.report);
            }

            return status;
          });
    }
function(testPath) {
      return browser.navigate()
          .to(TEST_SERVER + '/' + testPath)
          .then(function() {
            return waitForTestSuiteCompletion(testPath);
          })
          .then(function(status) {
            if (!status.isSuccess) {
              failureReports.push(status.report);
            }

            return status;
          });
    }
function ( testPath ) { return browser . navigate ( ) . to ( TEST_SERVER + '/' + testPath ) . then ( function ( ) { return waitForTestSuiteCompletion ( testPath ) ; } ) . then ( function ( status ) { if ( ! status . isSuccess ) { failureReports . push ( status . report ) ; } return status ; } ) ; }
Navigates to testPath to invoke tests. Upon completion inspects returned test status and keeps track of the total number failed tests.
Navigates to testPath to invoke tests . Upon completion inspects returned test status and keeps track of the total number failed tests .