           chai.expect(caseB.name).to.include 'sub sub topic'
           done()
 
+  describe 'running a passing test', ->
+    it 'should recorded 1 passed test', (done) ->
+      options =
+        files: [ testPath('bdd-simple-passing.coffee') ]
+      mochacompat.setup options, (err, state, server) ->
+        httpServer = server
 
+        onUpdate = (s) ->
+          state = s
+        ru = new runner.Runner runtimeDefinition(options)
+        ru.connect (err) ->
+          return done err if err
+          runner.getComponentSuites ru, (err, suites) ->
+            return done err if err
+            runner.runAll ru, suites, onUpdate, (err) ->
+              return done err if err
+              chai.expect(state).to.have.length 1
+              cases = state[0].cases
+              chai.expect(cases).to.have.length 1
+              chai.expect(cases[0].passed, 'testcase did not pass').to.equal true
+              done()
 

describe 'Mocha compatibility runner', ->
  httpServer = null
  definition = null

  afterEach () ->
    if httpServer
      httpServer.close()

  it 'should implement the FBP runtime protocol', (done) ->
    options =

mochacompat = require '../src/mochacompat'
protocol = require '../src/protocol'
testsuite = require '../src/testsuite'
runner = require '../src/runner'

testPath = (name) ->
  path = require 'path'
