emberjs/ember.js — pull request #3125 by eviltrout (2013-08-09 14:35:30+00:00)
Title: Asserts that a target element is in the DOM on `appendTo` and `replaceIn`

The behavior of `appendTo` and `replaceIn` are unexpected if the target you supply them with does not exist in the DOM.

In that case, the view will transition to the `inDOM` state even though it's not in the DOM, which is inconsistent.

I believe that if people use `appendTo` with a missing target it is almost certainly programmer error and you are doing something wrong. This patch includes an assertion to ensure that targets are actually present.

Note one of the unit tests appends to 'qunit-fixture' instead of '#qunit-fixture' so I already found one bug as a result!