   equals animation.I.currentFrameIndex, 0, "Should be on the first frame of Idle2"
 
 test "should be able to force transition to new state", ->
-  animation = GameObject
-    data: animationData
-    includedModules: ["Animated"]
-
   animation.update()
 
   animation.transition("Idle2", true)

  equal animation.I.currentFrameIndex, 5 + 1
  ok chompSoundFired, "Chomp sound effect fired"

test "should set hflip and vflip values", ->

  obj = GameObject
    data: animationData
    includedModules: ["Animated"]

  obj.update()

  ok obj.I.hflip
  ok obj.I.vflip

module()


  ok completeFired, "Complete event fired"

test "should advance to next state after last frame", ->
  animation.I.activeAnimation.frames.length.times ->
    animation.update()

  equals animation.I.activeAnimation.name, animation.I.activeAnimation.complete, "After the bite cycle we should end up in the next state specified by the animation"

test "should loop on looping animation states", ->
  animation.transition("Idle1", true)

  30.times -> animation.update()
