Skip to content

Instantly share code, notes, and snippets.

@KDawg
Created January 23, 2013 21:22
Show Gist options
  • Save KDawg/4613571 to your computer and use it in GitHub Desktop.
Save KDawg/4613571 to your computer and use it in GitHub Desktop.
Skeleton poofing a new Jasmine test JS in our TC project world
require(['mediator', 'jquery', 'underscore', 'backbone', 'namespace', 'i18n!common/i18n/nls/strings',
'models/the_feature/some_model', 'views/the_feature/some_view'],
function(mediator, $, _, Backbone, app, t, TheModel, TheView) {
describe('Create Trip View', function() {
var createModel, createView;
beforeEach(function() {
createModel = new Backbone.Model();
createView = new Backbone.View({model: createModel});
});
it('can create application objects for testing', function() {
expect(createModel).toBeDefined();
expect(createView).toBeDefined();
});
it('is happy with all valid user input', function() {
});
it('catches invalid user input missing name', function() {
});
it('catches invalid user input all blanks', function() {
});
it('catches invalid user input that\'s too long', function() {
});
});
}
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment