Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
krispenney committed Nov 1, 2022
1 parent c87a3c9 commit a96944f
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ import { createBrowserHistory } from "history"
import React from "react"
import { Provider } from "react-redux"
import { render } from "@testing-library/react"
import { createStore } from "redux"
import {createStore} from "redux"
import { rootReducer } from "src/ducks"
import {createReduxHistoryContext} from "redux-first-history";

const { routerReducer } = createReduxHistoryContext({
history: createBrowserHistory()
})

// this is a handy function that I normally make available for all my tests
// that deal with connected components.
Expand All @@ -25,7 +30,7 @@ export const renderWithRedux: (
ui,
{
initialState,
store = createStore(rootReducer(createBrowserHistory()), initialState)
store = createStore(rootReducer(routerReducer), initialState)
}: any = {}
) => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { Provider } from "react-redux"
import { render } from "@testing-library/react"
import { createStore } from "redux"
import { rootReducer } from "src/ducks"
import {createReduxHistoryContext} from "redux-first-history";

const { routerReducer } = createReduxHistoryContext({
history: createBrowserHistory()
})

// this is a handy function that I normally make available for all my tests
// that deal with connected components.
Expand All @@ -25,7 +30,7 @@ export const renderWithRedux: (
ui,
{
initialState,
store = createStore(rootReducer(createBrowserHistory()), initialState)
store = createStore(rootReducer(routerReducer), initialState)
}: any = {}
) => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { Provider } from "react-redux"
import { render } from "@testing-library/react"
import { createStore } from "redux"
import { rootReducer } from "src/ducks"
import {createReduxHistoryContext} from "redux-first-history";

const { routerReducer } = createReduxHistoryContext({
history: createBrowserHistory()
})

// this is a handy function that I normally make available for all my tests
// that deal with connected components.
Expand All @@ -25,7 +30,7 @@ export const renderWithRedux: (
ui,
{
initialState,
store = createStore(rootReducer(createBrowserHistory()), initialState)
store = createStore(rootReducer(routerReducer), initialState)
}: any = {}
) => {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { Provider } from "react-redux"
import { render } from "@testing-library/react"
import { createStore } from "redux"
import { rootReducer } from "src/ducks"
import {createReduxHistoryContext} from "redux-first-history";

const { routerReducer } = createReduxHistoryContext({
history: createBrowserHistory()
})

// this is a handy function that I normally make available for all my tests
// that deal with connected components.
Expand All @@ -25,7 +30,7 @@ export const renderWithRedux: (
ui,
{
initialState,
store = createStore(rootReducer(createBrowserHistory()), initialState)
store = createStore(rootReducer(routerReducer), initialState)
}: any = {}
) => {
return {
Expand Down

0 comments on commit a96944f

Please sign in to comment.