Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
exports.testKeepViewsAlive = function(test) {
var yCalcCount = 0;
var data = mobservable.observable({
x: 3,
y: function() {
yCalcCount++;
return this.x * 2;
},
z: "hi"
});
var component = observer(function testComponent() {
return React.createElement("div", {}, data.z + data.y);
});
var c$ = shallow(component, { });
var cResult = c$.getRenderOutput();
test.equal(yCalcCount, 1);
Unlike promised, even with shallow rendering we need the dom sometime in React 0.13...
*/
var jsdom = require("jsdom");
global.document = jsdom.jsdom('');
global.window = document.parentWindow;
global.navigator = window.navigator;
var mobservable = require('mobservable');
var React = require('react/addons');
var TestUtils = React.addons.TestUtils;
var observer = require('mobservable-react').observer;
var e = React.createElement;
var store = mobservable.observable({
todos: [{
title: "a",
completed: false
}]
});
var todoItemRenderings = 0;
var todoItem = observer(function TodoItem(props) {
todoItemRenderings++;
return e("li", {}, props.todo.title);
});
var todoListRenderings = 0;
var todoList = observer(React.createClass({
renderings: 0,
render: function() {
190: 'darkred',
1000: '#01afaf',
1100: '#01afaf',
1200: '#01afaf',
1300: '#01afaf',
1400: '#01afaf',
220: 'darkred',
230: 'darkred',
240: 'darkred',
250: 'darkred',
260: 'darkred',
270: 'darkred',
27: '#000000',
};
let data = mobservable.observable({
group: 'solo',
timerSize: '18',
groupBackup: 'solo',
chatMessage: '',
chatArray: [],
information: 'click ROLL to begin playing.',
resPrevious: '',
dd1: 0,
dd2: 0,
dd3: 0,
dd4: 0,
goal2: 20,
COUNTDOWN: 10,
test: true,
groupWatch: function() {
if (this.group === 'GroupA' && this.test) {