tests for addObserver and removeObserver with optional 3rd parameter

This commit is contained in:
Thomas Gossmann
2018-05-16 22:35:16 +02:00
committed by GitHub
parent 9abbb97f48
commit ebb93d17ef
+5
View File
@@ -14,6 +14,11 @@ class MyComponent extends Ember.Component {
this.removeObserver('foo', this, this.fooDidChange);
Ember.removeObserver(this, 'foo', this, 'fooDidChange');
Ember.removeObserver(this, 'foo', this, this.fooDidChange);
const lambda = () => {
this.fooDidChange(this, 'foo');
};
this.addObserver('foo', lambda);
this.removeObserver('foo', lambda);
}
fooDidChange(sender: MyComponent, key: 'foo') {