 runAllTests = (runner, suites, updateCallback, doneCallback) ->
 
   runTest = (testcase, callback) ->
+    done = (error) ->
+      updateCallback()
+      callback error
+
+    
     runner.runTest testcase, (err, actual) ->
       console.log 'test assertion', testcase.assertion, err
       error = null

      testcase.passed = not error
      testcase.error = error?.message
      console.log error, testcase.passed
      updateCallback()
      callback error

  runner.setupSuite suites[0], (err) ->
    console.log 'setup suite', err

  count = 0
  for suite in suites
    for testcase in suite.cases
      count += 1 if predicate testcase, suite
  return count
      
class TestStatusClass
