Skip to content

Instantly share code, notes, and snippets.

@lpaulger
Created June 17, 2016 12:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lpaulger/97a8c57d5ea884da625475b868623dac to your computer and use it in GitHub Desktop.
Save lpaulger/97a8c57d5ea884da625475b868623dac to your computer and use it in GitHub Desktop.
example test with constructor arguments
describe('when creating a ThingViewModel', function () {
var ctorArgs;
beforeEach(function(){
ctorArgs = {
ThingApi: {
getThings: function(){}
},
ThingUtility: {}
}
});
it('should return an object', function () {
var thingViewModel = new ThingViewModel(ctorArgs);
expect(typeof thingViewModel).toBe('object');
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment