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
Post a Comment