javascript - Unable to use Breeze in Jasmine/Karma tests -


it seems can't starting point try test breeze using jasmine , karma (in node.js) runner. vs 2013. karma runs in own server had allow cors. regardless, following jasmine test not run:

describe('able retrieve single account record...', function() {     var manager, acc, asynccallcomplete;      asynccallcomplete = false;     manager = new breeze.entitymanager({         servicename: 'http://localhost:35092/api/breezeapi'     });      // load filtered accounts     runs(function() {         breeze.entityquery.from('accounts')             .select('id, accountname')             .where('id', '==', 2)             .using(manager).execute()             .then(function() {                 acc = data.result;             asynccallcomplete = true;             }, function (error) {             asynccallcomplete = true;             throw error;         });          waitsfor(function () {             return asynccallcomplete != false;         });          expect(acc.accountname).tobe('account two');     }); }); 

simple enough, doesn't work. query neither succeeds nor fails, times out. interestingly, browser shows metadata retrieved, there no subsequent call obtain account record (in case).


Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -