import React from 'react'
import { mount } from '../../test/utils'

import { Stack } from '../Stack'

describe('<Stack />', () => {
  it('renders its children in nested div', () => {
    const renderChildren = () =>
      [0, 1].map((i) => <Stack.Item key={i}>Child {i}</Stack.Item>)
    const stack = mount(<Stack>{renderChildren()}</Stack>)
    expect(stack).toContainReactComponentTimes(Stack.Item, 2)
  })
})
