Commit d17a7f04 authored by jaubourg's avatar jaubourg

Adds a unit test to control options are being copied by jQuery.Callbacks internally.

parent ad329384
......@@ -203,3 +203,21 @@ jQuery.each( tests, function( strFlags, resultString ) {
});
})();
test( "jQuery.Callbacks( options ) - options are copied", function() {
expect( 1 );
var options = {
memory: true
},
cb = jQuery.Callbacks( options );
options.memory = false;
cb.fire( "hello" );
cb.add(function( hello ) {
strictEqual( hello, "hello", "options are copied internally" );
});
});
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment