 			layerB.animate "noParent", instant: true
 			assert.equal(layerB.parent, null)
 
-			layerB.animate "initial", instant: true
+			layerB.animate initialStateName, instant: true
 			# assert.equal(layerB.parent, layerA)
 
 		it "should set the current and previous states when switching", ->

			layer.animate "stateA", instant: true
			layer.x.should.equal 200 - (layer.width // 2)

			layer.animate "initial", instant: true
			layer.x.should.equal 0

		it "should set the parent", ->

			it "should emit willSwitch when switching", (done) ->

				test = (previous, current, states) =>
					previous.should.equal initialStateName
					current.should.equal 'a'
					@layer.states.state.should.equal initialStateName
					done()

				@layer.states.on 'willSwitch', test
