BDD
component{
function beforeAll(){}
function afterAll(){}
function run( testResults, testBox ){
describe("A Spec", function(){
beforeEach( function( currentSpec ){
// before each spec in this suite
});
afterEach( function( currentSpec ){
// after each spec in this suite
});
aroundEach( function( spec, suite ){
// execute the spec
arguments.spec.body();
});
describe("A nested suite", function(){
// my parent's aroundEach()
beforeEach( function(){
// before each spec in this suite + my parent's beforeEach()
});
afterEach( function(){
// after each spec in this suite + my parent's afterEach()
});
});
});
describe("A second spec", function(){
beforeEach( function( currentSpec ){
// before each spec in this suite, separate from the two other ones
});
afterEach( function( currentSpec ){
// after each spec in this suite, separate from the two other ones
});
});
}
}Life-Cycle Data Binding
Last updated
Was this helpful?