Is there a way to have describe operate on a sync level but the it()s can be async?

14 views
Skip to first unread message

Daniel Durante

unread,
Jul 19, 2013, 8:33:34 PM7/19/13
to bust...@googlegroups.com
Example of my usage:

var myProfileId;

describe('Build a Customer Profile', function() {
  it('makes an http request to a 3rd party API...', function(done) {
    request.post('<url>', formData, function(data) {
       expect(data).toBeDefined();
       myProfileId = data.id;
       done();
    })
  })
})

describe('Delete a customer Profile', function() {
   it('makes sure that we can delete a customer profile', function(done) {
     request.delete('<url>/' + myProfileId, function(err, response) {
       expect(response).toEqual('OK!');
     })
  })
})

Basically just need a way for describe build to come before delete :)

Christian Johansen

unread,
Jul 30, 2013, 4:42:13 PM7/30/13
to bust...@googlegroups.com
Hi Daniel,

Buster currently does not support ordered tests. This will be supported
in the next version. In either case, I would suggest you not make your
tests order-dependent, but that's just friendly advice ;)

Christian
Reply all
Reply to author
Forward
0 new messages