I'm trying to write jasmine test to check is view changing time or not
it 'ticks the time', ->
@time = parseInt($('#timer h1').text())
setTimeout (->
@after = parseInt($('#timer h1').text())
expect(@time).toBeLessThan(@after)
), 1000
The problem is that when time of setTimeout
is up the jasmine
is already finished his job, no html code on page related to this test at that moment.