busterjs/buster — Issue #83: async test succeeds even with a failing assertion
Author: Integralist
Created: 2012-02-17 16:28:15+00:00
State: open

Hi,

I'm testing Buster.js and I wanted to see how the 'async' tests worked. I put together a basic example (see below)...

```js
buster.testCase('my test case', {

'//A test that I want to comment out for a while but not hide from the test results': function(){
var num = 123;
assert.match(num, 123);
},

'an async test': function (done) {
var num = 123;
window.setTimeout(function(){
assert.match(num, 123);
done();
}, 10000);
}

});
```

...but I noticed that the test results were coming back...

![async test](http://f.cl.ly/items/2q2z3B0Z2t3K1d2M0z2i/Screen%20Shot%202012-02-17%20at%2016.18.52.png)

...I assume it's showing red because the tests are running async. But I was expecting the overall test time to increase also? e.g. `Finished in 0.xxxs` to be something like `Finished in 10.000s` (as I'm doing a `setTimeout` for 10 seconds). Can anyone clarify how the async process works.

Also, I then decided to test the async theory further by putting in a failing assertion and the test still passed!? (i.e. the same image as above).

Thanks.