Thanks for the reply guys, what I am doing is straight out of the
docs, copied below:
<snip>
var encryptedPath = '/media/internal/test.xml';
var decryptedPath = '/media/internal/test.dec.xml';
var decryptionServiceProxy = new DecryptionServiceProxy(new
ServiceRequestFactory(logger), logger);
decryptionServiceProxy.decrypt(encryptedPath,
function(content) {
logger.info("Decrypted content: " + content);
decrypted = content;
}, decryptedPath);
waitsFor(function() {
return decryptionServiceProxy.isInQueue(encryptedPath);
}, "Decryption never completed", 10000);
runs(function () {
expect(decrypted).toEqual(expectedDecrypted);
});
</snip>
The test fails and in the logs I see:
<snip>
2011-03-17T16:49:29.464339Z [542] qemux86 user.notice LunaSysMgr:
{LunaSysMgrJS}:
com.hello.app: Info: ====> Jasmine webOS: prepping to
run specs, palmInitFramework367:2569
...
2011-03-17T16:49:29.769814Z [542] qemux86 user.notice LunaSysMgr:
{LunaSysMgrJS}:
com.hello.app: Info: Jamine.log: >> Jasmine waiting
for Decryption never completed, palmInitFramework367:2569
</snip>
The test fails without waiting for the 10 seconds...then a bit later:
<snip>
2011-03-17T16:49:30.821319Z [543] qemux86 user.notice LunaSysMgr:
{LunaSysMgrJS}:
com.hello.app: Info: Decrypted content: <enc>ThisWas
the expected encrypted content</enc> , palmInitFramework367:2569
</snip>
On Mar 16, 5:49 pm, Doug Reeder <
reeder...@gmail.com> wrote:
> waitsFor works just fine under webOS. Can you post the code that isn't behaving as you expect?
>
> On Mar 16, 2011, at 7:27 PM, Ivo wrote:
>
> > Does jasmine-webos support async testing using waits/waitsFor? My
> > guess is not since tests that uses these are reported as green even
> > though it should be failing.
>
> Doug Reeder
> reeder...@gmail.comhttp://
reeder29.livejournal.com/https://twitter.com/reeder29
>
>
https://twitter.com/hominidsoftwarehttp://outlinetracker.com