it('should reap the request', function (done) { fakeweb.registerUri({ uri: 'http://localhost:8060/batchSmartAdd', body: JSON.stringify({ timings: 'timings' }) }); anubis.reap(function(err, result) { result.should.eql('timings'); done(); }); });
it('should reap the request', function (done) { var ran = false; dalFake.addFake(/INSERT INTO .* \(base, idr, path, hash, offset, len, lat, lng, q0, q1, q2, q3, par\) VALUES/i, function (binds) { binds.should.be.an('array'); ran = true; }); anubis.reap(); setTimeout(function () { ran.should.equal(true); done(); }, 250); });