import React from 'react';
import renderer from 'react-test-renderer'; // eslint-disable-line import/no-extraneous-dependencies
import Toaster from './index';

const createStore = require('redux').createStore;
const combineReducers = require('redux').combineReducers;
const Provider = require('react-redux').Provider;
const toastrReducer = require('react-redux-toastr').reducer;

const reducers = {
  toastr: toastrReducer
};
const reducer = combineReducers(reducers);
const store = createStore(reducer);


test('Title renders correctly', () => {
  const tree = renderer.create(
    <div>
      <Provider store={store}>
        <Toaster />
      </Provider>
    </div>
  ).toJSON();
  expect(tree).toMatchSnapshot();
});

