foounit icon indicating copy to clipboard operation
foounit copied to clipboard

when a before fails the corresponding after is not run

Open foobarfighter opened this issue 14 years ago • 1 comments

This may only be true for before blocks that run asynchronous blocks. Example (waitFor fails):

describe('foounit.server.loader', function (){ var server, client;

before(function (){
  server = TestServer.start('0.0.0.0', 5999);
  client = new TestClient('0.0.0.0.', 5999);

  client.get('/status');

  waitFor(function (){
    var response = client.inbox.takeNext();
    console.log(response.body);
    expect(response.body.indexOf('status:')).to(beGt, -1);
  });
});

after(function (){
  server.stop();
  client.stop();
});

it('passes', function (){
  console.log('w00t!');
});

});

foobarfighter avatar May 01 '11 07:05 foobarfighter

Is this issue going to be fixed somewhere down the roadmap?

uzikilon avatar Aug 24 '12 21:08 uzikilon