The stop() method doesn't really work that way (it would have to
behave synchronously for that to be the case). You'll have to do one
stop() at the start of the test block and then either do only one
async test or just keep a counter of the number of tests that've
completed and only run the start() after all of them have returned.

--John



On Sun, Jan 3, 2010 at 5:52 AM, Karel Minarik <karel.mina...@gmail.com> wrote:
> Hi,
>
> I am trying to use QUnit test framework for testing/TDD of CouchDB
> apps (testing map/reduce, validations, etc).
>
> The basic test case -- testing validations -- could look like this:
> http://pastie.textmate.org/764793 (I am testing return value in the
> `db.saveDoc()` callbacks.)
>
> The problem is that the results are not reliable: sometimes two
> assertions -- `equals()` -- are run, sometimes zero, but never all.
> That is, I am getting "Expected 3 assertions, but 2 were run" and
> similar failures all the time.
>
> Do you see anything obviously wrong in this example? I've been
> following the example in http://docs.jquery.com/QUnit/expect#amount.
> Is there some problem with multiple assertion per test? (The test
> suite included with QUnit does have multiple assertions per test.)
>
> (For the record, I know of the `asyncTest()` function, I've tried to
> be more explicit with the test(), stop(), start() scenario.)
>
> Thanks for any pointers!
>
> Karel
>
> --
>
> You received this message because you are subscribed to the Google Groups 
> "jQuery Development" group.
> To post to this group, send email to jquery-...@googlegroups.com.
> To unsubscribe from this group, send email to 
> jquery-dev+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/jquery-dev?hl=en.
>
>
>

--

You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-...@googlegroups.com.
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en.


Reply via email to