Details
-
Story
-
Resolution: Fixed
-
Medium
-
None
-
5.2-alpha1
Description
- hasOwnProperty loops are never tested with objects, which don't have this property.
- No test for calling ConnectionManager#request wihout a callback. Essentially there exists code to do this, eventhough according to the design document the callback isn't optional. The same is true for delete and notAuthorizedRequest.
- No test on Connections used without specifying custom headers in the Request
- Usage of sinon.js in combination with Chai.js and sinon-chai could allow for more readable expectations. An alternative would be to create a bunch of own jasmine Matchers to test things like calls to the mocked connection manager.
- Math.random should not be used in tests. (Except in very rare situations)
- The semantics used in conjunction with describe and it are not 100% correct. Both calls should be readable like an english sentence:
describe('PromiseCAPI', function() { it('should be instantiable with a CAPI service', function() {...}); describe('FunctionWrapping', function() { it('should wrap services into PromiseService', function() {...}); }); });