/**
 * Test case for apResizeMixin.
 * Runs with mocha.
 */
'use strict'

const ApResizeMixin = require('../lib/ap_resize_mixin.js').default
const React = require('react')
const ReactDOM = require('react-dom/server')
const assert = require('assert')

describe('ap-resize-mixin', () => {
  before((done) => {
    done()
  })

  after((done) => {
    done()
  })

  it('Ap resize mixin', (done) => {

    const MockClass = React.createClass({
      mixins: [
        ApResizeMixin
      ],
      render () {
        const s = this
        return React.createElement('div', {}
        )
      }
    })
    let root = React.createElement(MockClass, {
      windowDidResize() {
      }
    })
    let html = ReactDOM.renderToString(root)
    assert.ok(html)
    done()
  })
})

/* global describe, before, after, it */
