Fixed a couple errors in the tests.

This commit is contained in:
Scott Erickson 2014-10-21 11:54:03 -07:00
parent 091910f2ad
commit ba79d59190
2 changed files with 5 additions and 2 deletions

View file

@ -152,6 +152,7 @@ module.exports = class GoalManager extends CocoClass
checkForInitialUserCodeProblems: ->
# There might have been some user code problems reported before the goal manager started listening.
return unless @world
for thang in @world.thangs when thang.isProgrammable
for message, problem of thang.publishedUserCodeProblems
@onUserCodeProblem {thang: thang, problem: problem}, 0

View file

@ -136,12 +136,14 @@ describe 'SegmentedSprite', ->
segmentedSprite.tick(500)
expect(segmentedSprite.baseMovieClip.currentFrame).toBe(6)
it 'emits animationend for animations where loops is false and there is no goesTo', ->
it 'emits animationend for animations where loops is false and there is no goesTo', (done) ->
fired = false
segmentedSprite.gotoAndPlay('onestep')
segmentedSprite.on('animationend', -> fired = true)
segmentedSprite.tick(1000)
expect(fired).toBe(true)
_.defer -> # because the event is deferred
expect(fired).toBe(true)
done()
it 'scales rendered animations like a MovieClip', ->
# build a movie clip, put it on top of the segmented sprite and make sure