Skip to content

Commit

Permalink
Add node-style async to SampleSpecs
Browse files Browse the repository at this point in the history
  • Loading branch information
asalant authored and mhevery committed Dec 14, 2011
1 parent cfcb7a0 commit fe3953d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/SampleSpecs.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,14 @@ describe('jasmine-node', function(){
expect('first').toEqual('first');
asyncSpecWait();
});

it('shows asynchronous test node-style', function(done){
setTimeout(function(){
expect('second').toEqual('second');
// If you call done() with an argument, it will fail the spec
// so you can use it as a handler for many async node calls
done();
}, 1);
expect('first').toEqual('first');
});
});

0 comments on commit fe3953d

Please sign in to comment.