/* eslint-env mocha */

import React from 'react'
import { assert } from 'chai'
import { mount } from 'enzyme'
import Animate from '.'

describe('<Animate />', () => {
  it('should render nodes wrapped in the outer element', done => {
    const wrapper = mount(
      <Animate start={{}} wrapperClass="node-wrapper">
        <div className="node">{() => 'Node Text'}</div>
      </Animate>,
    )

    setTimeout(() => {
      assert.strictEqual(wrapper.find('.node-wrapper').length, 1)
      done()
    }, 50)
  })
})

@@ -508,12 +508,936 @@
 50)%0A  %7D)
+%0A%0A  it('should work with no props', done =%3E %7B%0A    const wrapper = mount(%0A      %3CAnimate /%3E%0A    )%0A%0A    setTimeout(() =%3E %7B%0A      assert.strictEqual(wrapper.find('div').length, 1)%0A      done()%0A    %7D, 50)%0A  %7D)%0A%0A  it('should run a interpolations on enter with no other props', done =%3E %7B%0A    let last = 0%0A%0A    const i = t =%3E %7B%0A      last = t%0A      return t%0A    %7D%0A    %0A    mount(%0A      %3CAnimate enter=%7B%7B t: i %7D%7D /%3E%0A    )%0A%0A    setTimeout(() =%3E %7B%0A      assert.strictEqual(last, 1)%0A      done()%0A    %7D, 300)%0A  %7D)%0A%0A  it('should run a interpolations on update with no other props', done =%3E %7B%0A    let last = 0%0A%0A    const i = t =%3E %7B%0A      last = t%0A      return t%0A    %7D%0A    %0A    const wrapper = mount(%0A      %3CAnimate update=%7B%7B t: i %7D%7D /%3E%0A    )%0A%0A    setTimeout(() =%3E %7B%0A      assert.strictEqual(last, 0)%0A      wrapper.setProps(%7B show: true %7D)%0A    %7D, 300)%0A%0A    setTimeout(() =%3E %7B%0A      assert.strictEqual(last, 1)%0A      done()%0A    %7D, 600)%0A  %7D)
 %0A%7D)%0A

add tests