mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 00:40:56 -05:00
Fixed a couple errors in the tests.
This commit is contained in:
parent
091910f2ad
commit
ba79d59190
2 changed files with 5 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue