I am writing a code where my "it" block generates an array, and i like to loop through it and do some tests in the same describe block, i tried writing that array to file and access it but those tests executes first before i write to it.i Cant access "a" outside mocha tests, but i like to whether there is anyway to do it?
it("test",function(done){
a=[1,2,3]
})
a.forEach(function(i){
it("test1",function(done){
console.log(i)
})
})
via Kumar Mantri
No comments:
Post a Comment