documentation
[mkws-moved-to-github.git] / test / spec / sample.spec.js
1 /* Copyright (c) 2013 IndexData ApS. http://indexdata.com
2  *
3  * jQuery sample from system documentation
4  *
5  */
6
7 describe('jasmine-node', function(){
8
9   it('should pass', function(){
10     expect(1+2).toEqual(3);
11   });
12
13   it('shows asynchronous test', function(){
14     setTimeout(function(){
15       expect('second').toEqual('second');
16       asyncSpecDone();
17     }, 1);
18     expect('first').toEqual('first');
19     asyncSpecWait();
20   });
21
22   it('shows asynchronous test node-style', function(done){
23     setTimeout(function(){
24       expect('second').toEqual('second');
25       // If you call done() with an argument, it will fail the spec
26       // so you can use it as a handler for many async node calls
27       done();
28     }, 1);
29     expect('first').toEqual('first');
30   });
31 });