You're not using the correct syntax for JsMockito. It should be
"verify(function, times(2))();", assuming that you're not wanting to
match any of the arguments passed to the function.
cheers,
chris
On Apr 20, 1:18 am, Mark Nijhof <
mark.nij...@cre8ivethought.com>
wrote:
> Ah very nice!
>
> I didn't get the JsMockito to work, it worked halfway meaning that I
> could call the spy and verify method, but the chain was broken after
> that. So verify(function).times(2) told me that times was not a
> function. They have some nice syntax, but yours works very well as
> well.
>
> Thanks for your time! Already written 105 tests TDD way and have found
> lots of value in having them! I added a location.reload every 2500
> miliseconds which works great. Will blog about it soon :-)
>
> -Mark
>
> On Tue, Apr 20, 2010 at 1:03 AM, vision media [ Tj Holowaychuk ]
>
>
>
>
>
> <
t...@vision-media.ca> wrote:
> > stubbing is way different. I call it a "proxy assertion", but you would do:
>
> > jQuery.templateLoader.should.receive('makeAjaxCall').with_args('whatever'). and_return('something')
> >> >>> e:
mark.nij...@cre8ivethought.com
> >> > e:
mark.nij...@cre8ivethought.com
> >> e:
mark.nij...@cre8ivethought.com
> e:
mark.nij...@cre8ivethought.com