Testing component content

Hi all,

I’m trying to get some basic Integration tests going for some of my components. Looking at the docs and other examples it would seem that generally you want to not make things too complicated for yourself and assert against the rendered text content, for example. That’s all fine for basic small examples but my component renders an entire table of content. Looking at the string output it would appear my tests would get kinda messy. What do others do when doing component content rendering tests?


You don’t need to grab the whole output as a string. You can select individual DOM elements and make fine-grained assertions about them.

All of qunit-dom’s assertions are included in the default Ember app blueprint.

Makes sense. Thanks :slight_smile: