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 have one tab per groupId and an empty Other tab when all are defined', () => {
const root = mount(
);
testChannel.on.mock.calls[0][1]({
knobs: {
foo: {
name: 'foo',
defaultValue: 'test',
used: true,
groupId: 'foo',
},
bar: {
name: 'bar',
defaultValue: 'test2',
used: true,
addDecorator(storyFn => (
{storyFn()}
));
import React from 'react';
import { themes, ThemeProvider, convert } from '@storybook/theming';
import { action } from '@storybook/addon-actions';
import SidebarHeading from './SidebarHeading';
const { light } = themes;
const theme = convert(light);
export default {
component: SidebarHeading,
title: 'UI|Sidebar/SidebarHeading',
decorators: [
(storyFn: any) => (
<div style="{{">
{storyFn()}
</div>
),
],
addDecorator(storyFn => (
{storyFn()}
));
key={`progress-portion-${entry[0]}`}
color={getColorByType(entry[0])}
progressPercent={
entry[1]
? (entry[1].length / result.assertionResults.length) * 100
: 0
}
/>
);
})}
) : null}
<div color="{getColorByType(StatusTypes.FAILED_TYPE)}" title="{`${" id="failing-tests">
{testsByType.get(StatusTypes.FAILED_TYPE) ? (
testsByType.get(StatusTypes.FAILED_TYPE).map((res: any) => (
</div>
const DocsContent = ({ title, content, editUrl, ...rest }) => (
<div id="docs-content">
<div>
<h2>{title}</h2>
<p>
<a rel="noopener noreferrer" href="{editUrl}">
Edit this page
</a>
</p>
<div>
{parse(content, {
replace: domNode => {
if (
domNode.name === 'pre' &&
domNode.children.find(
n => n.name === 'code' && n.attribs.class && n.attribs.class.match(/^language-/)
)
) {
const language = domNode.children[0].attribs.class.replace('language-', '');
const code = domNode.children[0].children[0].data;
return (
{code}
);
}</div></div></div>