kaoDev/react-ts-sample

View on GitHub
src/__tests__/store/reduxSagaStore.test.ts

Summary

Maintainability
B
5 hrs
Test Coverage
import { createApplicationStore } from 'store/reduxSagaStore'
import { initialAppState } from 'models/applicationState'

describe('createApplicationStore should create a store object', () => {
  const store = createApplicationStore()

  test('saga store provides a valid redux store object', () => {
    expect(store).toBeDefined()
    expect(store.dispatch).toBeDefined()
    expect(store.getState).toBeDefined()
    expect(store.subscribe).toBeDefined()
  })

  test('saga store provides a ApplicationState', () => {
    expect(store.getState()).toMatchObject(initialAppState)
  })
})