       page = ""
       options = {}
       solver.runJob filter, page, options, (err, solution, details) ->
-        chai.expect(err).to.be.a 'object'
+        chai.expect(err).to.be.a 'error'
         chai.expect(err.message).to.contain 'this is my error'
         done()
 

      page = ""
      options = {}
      solver.runJob filter, page, options, (err, solution, details) ->
        chai.expect(err).to.be.a 'object'
        chai.expect(err.message).to.contain 'custom error'
        chai.expect(err).to.include.keys ['myproperty', 'otherproperty']
        chai.expect(err.myproperty).to.equal 'myvalue'

      page = ""
      options = {}
      solver.runJob filter, page, options, (err, solution, details) ->
        chai.expect(err).to.be.a 'error'
        chai.expect(err.message).to.contain 'window.jsJobRun'
        done()

