Using buster.js for BDD in javascript, I have some fairly hefty APIs to test. The default timeout isn't doing it for me under certain conditions. How do I override the default timeout for an (asynchronous) spec?
describe("Given a request for all combinations", function() {
var scenario = null, spec;
beforeAll(function() {
scenario = scenarios.buildFakeAPI();
});
before(function(done) {
spec = this;
// *** this request can take up to 60 seconds which causes a timeout:
scenario.request({ path: "/my/request/path" }, function(err, res) {
spec.result = res;
done();
});
});
it("it should have returned the expected thing", function() {
expect(spec.result).toMatch(/expected thing/);
});
});