Testing Blaze components with callbacks

I’ve been trying to get this to work for a while, but I’m still stuck. Basically, I have a component similar to the Meteor Guide, and a unit test for that based on the Meteor Testing Guide. This component can be passed a callback, which it will call when some internal state has changed.

Now I’m trying to write a unit test for this behavior – however, I can’t get the test to pass. It looks as though the withRenderedTemplate() helper from the guide may be removing the component before the callback had a chance to run, and thus the test fails. Original post (on the guide article) linked below.

Has anyone solved this issue before? How did you do it?