try/catch mkws fatal errors, and keep the error message in a variable
[mkws-moved-to-github.git] / test / spec / SampleSpecs.js
1 describe('jasmine-node', function(){
2
3   it('should pass', function(){
4     expect(1+2).toEqual(3);
5   });
6
7   it('shows asynchronous test', function(){
8     setTimeout(function(){
9       expect('second').toEqual('second');
10       asyncSpecDone();
11     }, 1);
12     expect('first').toEqual('first');
13     asyncSpecWait();
14   });
15
16   it('shows asynchronous test node-style', function(done){
17     setTimeout(function(){
18       expect('second').toEqual('second');
19       // If you call done() with an argument, it will fail the spec 
20       // so you can use it as a handler for many async node calls
21       done();
22     }, 1);
23     expect('first').toEqual('first');
24   });
25 });