Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('Should change from LinkEvent to Function', () => {
const data = { foo: 1 };
const linkObj = {
methodFn() {}
};
spyOn(linkObj, 'methodFn');
render(<div>, container);
expect(linkObj.methodFn).toHaveBeenCalledTimes(0);
container.firstChild.click();
expect(linkObj.methodFn).toHaveBeenCalledTimes(1);
const anotherObj = {
anotherFn() {}
};
spyOn(anotherObj, 'anotherFn');
render(<div>, container);
expect(anotherObj.anotherFn).toHaveBeenCalledTimes(0);
</div></div>
it('Should not fail when given event is invalid', () => {
render(<div>, container);
container.firstChild.click();
render(<div>, container);
container.firstChild.click();
render(<div>, container);
container.firstChild.click();
render(<div>, container);
container.firstChild.click();
render(<div>, container);
container.firstChild.click();
});
});</div></div></div></div></div>
};
spyOn(anotherObj, 'anotherFn').and.callThrough();
render(<div>, container);
expect(anotherObj.anotherFn).toHaveBeenCalledTimes(0);
container.firstChild.click();
expect(anotherObj.anotherFn).toHaveBeenCalledTimes(1);
expect(anotherObj.anotherFn).toHaveBeenCalledWith(obj1, secondArg);
anotherObj.anotherFn.calls.reset();
render(<div>, container);
expect(anotherObj.anotherFn).toHaveBeenCalledTimes(0);
container.firstChild.click();
expect(anotherObj.anotherFn).toHaveBeenCalledTimes(1);
expect(anotherObj.anotherFn).toHaveBeenCalledWith(obj2, secondArg);
});
});</div></div>
{this.state.list.map((item, index) => {
return <li>
<span>{item.name}</span>
</li>;
})}
return(
<div>
{/** The page's header */}
<header style="{">
{/** Sidenav */}
</header></div>
)
}
}
render(props) {
const applyModsEl = createElement(ApplyMods, Object.assign({}, props,
{
ifInputsDisabled: !this.state.ifModsChangesAreStashed || props.ifInputsDisabled,
onClick: linkEvent(this, this.handleModApply),
}
));
const modsHandlers = {
onConfChanged: this.handleModChange,
};
return createElement(TabPanel, Object.assign({}, props, {
tabs: [
{
label: chrome.i18n.getMessage('PAC_script'),
content: createElement(PacChooser, props),
key: 'pacScript',
},
{
label: chrome.i18n.getMessage('Exceptions'),
function TableCell({children}) {
/*
* The carbage code is intentional
*/
return (
{null}
{false}
{[children]}
);
}
export default (props: Object, { router }) =>
Lighting-fast, highly customizable and flexible <a href="https://infernojs.org/">Inferno</a> components<br>
that strictly follow <a href="https://material.io/guidelines/">Material Design</a> guidelines
Get started
function Row({ d, id, selected, deleteFunc, selectFunc }) {
return (
{id + ''}
<a>{d.label}</a>
<a>{ span }</a>
{ td }
)
}
{this.state.list.map((item, index) => {
return <li>
<a>
{item.name}
</a>
</li>;
})}