它阻止不采用describe block的上下文。
for( var i =0 ;i< dynamicFunctions.length; i++){
(function wrap(dynamicFunction){
describe("condition", function(){
// It is executing all functions sequentially one by one.
// since it is executed before it
dynamicFunction.apply(null)
it("should execute", function(){
// It is always executing last function of the array.
// since dynamicFunction is referring to last element of the array.
// how to executing all functions sequentially one by one
// like how it executes outside it block
dynamicFunction.apply(null);
}
})
}(dynamicFunctions[i]));
}
如何使用不同的函数运行它,比如它在块外执行的方式?