redux Testing Redux apps Redux + Mocha

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


Redux is very functional, so unit testing is very straightforward.

Action creator:

export function showSidebar () {
  return {
    type: 'SHOW_SIDEBAR'

Action creators unit test:

import expect from 'expect'
import actions from './actions'
import * as type from './constants'

describe('actions', () => {
  it('should show sidebar', () => {
    const expectedAction = {
      type: type.SHOW_SIDEBAR

Got any redux Question?