Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
describe("an async spec", function(){
beforeEach(function(){
var done = false;
function doStuff(){
// simulate async stuff and wait 10ms
setTimeout(function(){
done = true;
}, 10);
}
runs(doStuff);
waitsFor(function(){
return done;
});
});
it("did stuff", function(){
expect(done).toBe(true);
});
});
describe("an async spec", function(){
var foo = false,
async = new AsyncSpec(this);
async.beforeEach(function(done){
// simulate async stuff and wait 10ms
setTimeout(function(){
foo = true;
done();
}, 10);
});
it("did stuff", function(){
expect(foo).toBe(true);
});
});
@vprasanth

Line 16 should be async.it ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.