Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Why "waits" method is flagged as obsolete?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
GuyE  
View profile  
 More options Jan 13 2012, 10:47 am
From: GuyE <guy.ern...@gmail.com>
Date: Fri, 13 Jan 2012 07:47:54 -0800 (PST)
Local: Fri, Jan 13 2012 10:47 am
Subject: Re: Why "waits" method is flagged as obsolete?
From: https://github.com/pivotal/jasmine/wiki/Asynchronous-specs

waitsFor() provides a better interface for pausing your spec until
some other work has completed. Jasmine will wait until the provided
function returns true before continuing with the next block. This may
mean waiting an arbitrary period of time, or you may specify a
maxiumum period in milliseconds before timing out.

waitsFor(function() {
      return spreadsheet.calculationIsComplete();
    }, "Spreadsheet calculation never completed", 10000);

In the first argument function you can write any function that will
return true only when you want to proceed with your test run. It can
for example check that an array has values from a different ajax call
or other async process.

On Jan 12, 7:52 pm, Gian Marco Gherardi <gianmarco.ghera...@gmail.com>
wrote:

> /**
>  * Waits a fixed time period before moving to the next block.
>  *
>  * @deprecated Use waitsFor() instead
>  * @param {Number} timeout milliseconds to wait
>  */

> How to implement waits behavior with waitsFor?


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.