mirror of
https://github.com/harish2704/simple-mocha.git
synced 2026-09-10 06:21:08 +00:00
Tests for after block
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* globals describe, it, before */
|
||||
/* globals describe, it, before, after */
|
||||
|
||||
var messageLog = [];
|
||||
var pr = function( msg ){
|
||||
@@ -42,11 +42,18 @@ var it2 = asyncFn({
|
||||
error: null,
|
||||
});
|
||||
|
||||
var afterFn = asyncFn({
|
||||
msg: 'After_block',
|
||||
delay: 60,
|
||||
error: null,
|
||||
});
|
||||
|
||||
describe( 'describe', function(){
|
||||
|
||||
before( beforeFn );
|
||||
it( 'it1', it1 );
|
||||
it( 'it2', it2 );
|
||||
after( afterFn );
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -46,6 +46,12 @@ describe( 'Simple before block + it s ', function(){
|
||||
assert( itBlk.fn );
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
it( 'should parse after blocks', function(){
|
||||
assert( firsDescribeBlock.afterFn );
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user