Пример #1
0
 beforeEach(() => {
   const state = startingCounters([
     {id: 1, name: 'Cats', count: 2},
     {id: 2, name: 'Dogs', count: 4}
   ])
   this.render(<Counters />, state)
 })
Пример #2
0
    beforeEach(() => {
      const state = startingCounters([
        {id: 1, name: 'Cats', count: 2},
        {id: 2, name: 'Dogs', count: 4}
      ])
      this.render(<Counters />, state)

      const components = this.findComponents(Counter)
      const dog = _.findWhere(components, { props: { counter: { name: 'Dogs' } } })
      this.clickButton(dog, 'decrement-btn')
    })