Skip to content

Instantly share code, notes, and snippets.

@jameshartig
Last active August 29, 2015 14:16
Show Gist options
  • Save jameshartig/24c9b2f47c3ec271d82a to your computer and use it in GitHub Desktop.
Save jameshartig/24c9b2f47c3ec271d82a to your computer and use it in GitHub Desktop.
failed test backbone
test("destroy models in each loop", 4, function() {
var collection = new Backbone.Collection([{id: 1}, {id: 2}, {id: 3}, {id: 4}]);
collection.each(function(model) {
notStrictEqual(model, undefined);
if (model !== undefined) {
model.destroy({url: function() {}});
}
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment