Testing guide article

@tmeasday Maybe you can help me with this:

I have a Blaze component and I’m testing it as described in this article, using the withRenderedTemplate helper.

Let’s say I want to write a test for a method I’ve attached to the template instance (in Template.name.onCreated). I can’t for the life of me figure out how to get hold of the Template instance that was rendered.

As it is, the helper calls the callback only with the DOM element that the template was rendered into, but not the instance. I’ve spent an hour reading the docs and trying different things, but I can’t seem to get the template instance from either the el or Blaze.renderWithData.

What am I missing here?