Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
describe('Todo', function() {
var Todo = requirejs('models/todo');
var todo;
beforeEach(function() {
todo = new Todo();
});
it('defaults are empty title and not completed', function() {
expect(todo.get('title')).to.be.a('string').and.to.be.empty;
expect(todo.get('completed')).to.be.false;
});
it('when toggle then completed', function() {
todo.toggle();
expect(todo.get('completed')).to.be.true;
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.