mirror of
https://github.com/Hopiu/fabric.js.git
synced 2026-05-03 19:34:46 +00:00
Add test for context in trigger
This commit is contained in:
parent
ec32a3c399
commit
9539306a0e
1 changed files with 3 additions and 0 deletions
|
|
@ -105,12 +105,15 @@ test('trigger', function() {
|
|||
fabric.util.object.extend(foo, fabric.Observable);
|
||||
|
||||
var eventFired = false;
|
||||
var context;
|
||||
foo.on('bar:baz', function() {
|
||||
context = this;
|
||||
eventFired = true;
|
||||
});
|
||||
|
||||
foo.trigger('bar:baz');
|
||||
equal(true, eventFired);
|
||||
equal(foo, context);
|
||||
});
|
||||
|
||||
test('chaining', function() {
|
||||
|
|
|
|||
Loading…
Reference in a new issue