Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.testIsComponentReactive = function(test) {
var component = observer({ render: function() {}});
test.equal(component.isMobservableReactObserver, true);
test.equal(mobservable.isObservable(component), false); // dependencies not known yet
test.equal(mobservable.isObservable(component.render), false); // dependencies not known yet
component.componentWillMount();
component.render();
test.equal(mobservable.isObservable(component.render), true); // dependencies not known yet
test.equal(mobservable.isObservable(component), false);
mobservable.extendReactive(component, {});
test.equal(mobservable.isObservable(component), true);
test.done();
}
exports.testIsComponentReactive = function(test) {
var component = observer({ render: function() {}});
test.equal(component.isMobservableReactObserver, true);
test.equal(mobservable.isObservable(component), false); // dependencies not known yet
test.equal(mobservable.isObservable(component.render), false); // dependencies not known yet
component.componentWillMount();
component.render();
test.equal(mobservable.isObservable(component.render), true); // dependencies not known yet
test.equal(mobservable.isObservable(component), false);
mobservable.extendReactive(component, {});
test.equal(mobservable.isObservable(component), true);
test.done();
}