{"size": 1500, "ext": "js", "max_stars_repo_path": "src/store/test.js", "max_stars_repo_name": "zhyrik/cheat-sheet-gatsby-", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/store/test.js", "max_issues_repo_name": "zhyrik/cheat-sheet-gatsby-", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/store/test.js", "max_forks_repo_name": "zhyrik/cheat-sheet-gatsby-", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 35.7142857143, "max_line_length": 97, "alphanum_fraction": 0.6966666667}

export const setupFunc = `import Jotto from './Jotto'
const defaultProps = { seccess: false }

const setup = (props = {}) => {
  const setupProps = { ...defaultProps, ...props }
  return shallow(<Jotto {...setupProps} />)
}`
export const findByTestAttr = `test
|--testUtils.js

export const findByTestAttr = (wrapper, val) => wrapper.find(\`[data-test="\${'val'}"]\`)`
export  const test1 = `test('rennder without error', () => {
  const wrapper = setup({ success: false })
  const jottoComponent = findByTestAttr(wrapper, 'jotto-component')
  expect(jottoComponent.length).toBe(1)
})`
export  const test2 =`test('renders no test when success prop is folse', () => {
  const wrapper = setup({ success: false })
  const jottoComponent = findByTestAttr(wrapper, 'jotto-component')
  expect(jottoComponent.text()).toBe('')
})`
export const test3 =`test('renders non-empty congrats message when success prop is true', () => {
  const wrapper = setup({ success: true })
  const jottoComponent = findByTestAttr(wrapper, 'jotto-component')
  expect(jottoComponent.text()).not.toBe(0)
})`
export const test4 =`import checkPropTypes from 'check-prop-types'

export const checkProps = (componet, conformingProps) => {
  const propError = checkPropTypes(
    componet.propTypes,
    conformingProps,
    'prop',
    componet.name)
  expect(propError).toBeUndefined()
}

test('does not throw warning with expected props', () => {
  const expectedProps = { success: false }
  checkProps(Jotto, expectedProps)
})`