Skip to content

Instantly share code, notes, and snippets.

@Trindaz
Created January 9, 2013 06:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Trindaz/4491059 to your computer and use it in GitHub Desktop.
Save Trindaz/4491059 to your computer and use it in GitHub Desktop.
describe("d1", function(){
function step1(){
describe("A test description", function(){
it("A test it", function(done){
step2();
done();
})
})
};
function step2(){
describe("A test description 2", function(){
it("A test it 2", function(done){
step3();
done();
})
})
}
function step3(){
describe("A test description 3", function(){
it("A test it 3", function(done){
done();
})
})
}
step1();
});
describe("d2", function(){
var currentStep = 0;
var steps = [
function(){
describe("A test description (array)", function(){
it("A test it (array)", function(done){
currentStep++;
steps[currentStep]();
done();
})
})
},
function(){
describe("A test description (array) 2", function(){
it("A test it (array) 2", function(done){
done();
})
})
}
]
steps[currentStep]();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment