Testing a component : how to fix this please?


#1

So i have the following test that passes but gets the warning

DEPRECIATION: Using the default Container is no longer supported. [default Container#lookup]

describe "Facet selector component", ->

before ->
	component = App.FacetSelectorComponent.create(
		content: []
		name: 'brands'
	)

	Ember.run ->
		component.appendTo('body')

	@component = component


it "should display the name", ->
	@component.$().should.contain('brands')

Can anyone tell me how to update this test to remove the warning ?

thanks a lot Rick


#2

Check out this Stackoverflow post: http://stackoverflow.com/questions/16403147/how-do-i-reconfigure-views-to-not-use-the-defaultcontainer-in-ember-js

Try adding container.lookup() for view, then .appendTo() might work wothout deprecation warning.


#3

This was fairly informative for me:

as was this: