Cleanup tests

This commit is contained in:
2016-04-01 01:04:07 +05:30
parent 4894925ebe
commit 75d79358b6
2 changed files with 18 additions and 9 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
var _d = console.log.bind( console, 'dbg: ' );
// var _d = console.log.bind( console, 'dbg: ' );
var _d = function(){};
var fs = require('fs');
function DescribeBlock( parentBlock ){
+10 -2
View File
@@ -7,24 +7,32 @@ var assert = require('assert');
describe( 'Simple before block + it s ', function(){
it( 'should parse simple test file' , function( done ){
describe( 'should parse simple test file' , function(){
var runner = SimpleMocha.load( __dirname + '/data/dummy.spec.js' );
it( 'should load', function(){
assert( runner );
})
var describeBlock = runner.rootDescribeBlock;
it( 'should have a root describe block', function(){
assert( describeBlock );
assert( describeBlock instanceof SimpleMocha.DescribeBlock );
assert.equal( describeBlock.children.length, 1 );
});
var firsDescribeBlock = describeBlock.children[0];
it( 'rootDescribeBlock should have child blocks', function(){
assert( firsDescribeBlock instanceof SimpleMocha.DescribeBlock );
});
it( 'child describeBlock should parse before hook', function(){
assert( firsDescribeBlock.beforeFn );
});
done();
});
})