The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

Phil Caithness (3) [Avatar] Offline
#1
Hi,
Great course so far.
Particularly interested in the way you run integration tests on lambda's.
I am not sure why you are wrapping the test's describe() handler with co.
I understand why you are using generators in lambda's, and thus why they need to be wrapped in co - to 'run' the generators iterator.
I also understand why you are wrapping the before() and it() handlers in co in the tests - same reason.
But why use a generator (and thus wrapping it in co) for the describe() handler ?

thanks.
Yan Cui (73) [Avatar] Offline
#2
Hi Phil,

You're right, the describe() handlers don't need to be wrapped by co, I do it out of habit more than anything else.

Cheers,
Phil Caithness (3) [Avatar] Offline
#3
Thanks. Thats good to know, cause I am still trying to solidify my understanding of generators and co smilie