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

      page = ""
      options = {}
      solver.runJob filter, page, options, (err, solution, details) ->
        chai.expect(err).to.be.a 'object'
        chai.expect(err.message).to.contain 'this error was thrown'
        chai.expect(err.stack).to.contain 'mythrowingfunction'
        chai.expect(err.stack).to.contain 'return-thrown-error.js:3'

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

