mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 02:47:50 +00:00
Update vendors, minified builds, and rebuild docs.
Former-commit-id: 9be99ca3c78a1a35fd13138398c48ab4a4b35f11
This commit is contained in:
14
vendor/backbone/test/events.js
vendored
14
vendor/backbone/test/events.js
vendored
@@ -86,6 +86,20 @@ $(document).ready(function() {
|
||||
b.trigger('change');
|
||||
});
|
||||
|
||||
test("listenTo yourself", 1, function(){
|
||||
var e = _.extend({}, Backbone.Events);
|
||||
e.listenTo(e, "foo", function(){ ok(true); });
|
||||
e.trigger("foo");
|
||||
});
|
||||
|
||||
test("listenTo yourself cleans yourself up with stopListening", 1, function(){
|
||||
var e = _.extend({}, Backbone.Events);
|
||||
e.listenTo(e, "foo", function(){ ok(true); });
|
||||
e.trigger("foo");
|
||||
e.stopListening();
|
||||
e.trigger("foo");
|
||||
});
|
||||
|
||||
test("trigger all for each event", 3, function() {
|
||||
var a, b, obj = { counter: 0 };
|
||||
_.extend(obj, Backbone.Events);
|
||||
|
||||
Reference in New Issue
Block a user