I am trying to test the generator creation script. In my generator, I call a subgenerator if a specific prompt returns true
if(this.bar){ this.composeWith('foo:bar', {}); }
I obviously check the sub-generator of the bar separately. However, I would like to have a statement for this composeWith () that was called. And I suppose that the problem is more in my skills than in the examination documents, but I have no idea how to do this. I understand that I need a spy and a stub. But the documents just list the functions, and the tests for the omen generator itself are just mental (I tried to reproduce their steps, but they mainly use mannequins for everything, and I just need to drown out the sub-generator).
Any help would be really appreciated. Thanks.
source share