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

    options = {}
    solver.runJob filter, page, options, (err, outdata, details) ->
      chai.expect(outdata).to.not.exist
      chai.expect(err).to.be.a 'object'
      chai.expect(err.message).to.include 'JsJob cancelled due to Runner.stop()'
      chai.expect(err.type).to.equal "cancelled" # so apps can detect this kind of error and ignore it, as likely they intended to do stop()
      done()

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

