 			it "should emit didSwitch when switching", (done) ->
 
 				test = (previous, current, states) =>
-					previous.should.equal 'initial'
+					previous.should.equal initialStateName
 					current.should.equal 'a'
 					@layer.states.state.should.equal 'a'
 					done()

				layer.states =
					stateA: x:200
					stateB: scale: 0.5
				assert.deepEqual layer.stateNames, ['initial','stateA','stateB']

			it "should reset the previous and current states", ->
				layer = new Layer

						layer.x.should.equal 200
						layer.rotation.should.equal 180
						layer.animateToNextState(time: 0.05)
					when initialStateName
						layer.x.should.equal 0
						layer.rotation.should.equal 0
						done()
