import test from 'ava';

import sidebarReducer, { INITIAL_STATE } from '../src/reducers/sidebar';
import { toggleSidebar } from '../src/actions/sidebar';

test('When you toggle the siebar, you invert the state', t => {
  t.is(
    sidebarReducer(INITIAL_STATE, toggleSidebar()),
    !INITIAL_STATE
  );
});

import test from 'ava';

import sidebarReducer, { INITIAL_STATE } from '../src/reducers/sidebar';
import { toggleSidebar } from '../src/actions/sidebar';

test('When you toggle the siebar, you invert the state', t => {
  t.is(
    sidebarReducer(INITIAL_STATE, toggleSidebar()),
    !INITIAL_STATE
  );
});

test('No unknown action will change the state', t => {
  t.is(
    sidebarReducer(INITIAL_STATE, { type: 'foo' }),
    INITIAL_STATE
  );
});

Test sidebar reaction to unknown actions
Test sidebar reaction to unknown actions
