Skip to content

Commit

Permalink
use our own store in the store spec instead of a generic redux store (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Rosas authored and coryhouse committed Oct 10, 2017
1 parent f255702 commit 4fad0e5
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/store/store.spec.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import * as ActionTypes from '../constants/actionTypes';

import MockDate from 'mockdate';
import { createStore } from 'redux';
import configureStore from './configureStore';

import calculator from '../utils/fuelSavingsCalculator';
import {getFormattedDateTime} from '../utils/dateHelper';
import initialState from '../reducers/initialState';
import rootReducer from '../reducers';

describe('Store', () => {
let dateModified;
Expand All @@ -18,7 +16,7 @@ describe('Store', () => {
afterAll(() => MockDate.reset());

it('should display results when necessary data is provided', () => {
const store = createStore(rootReducer, initialState);
const store = configureStore();

const actions = [
{ type: ActionTypes.CALCULATE_FUEL_SAVINGS, dateModified, settings: store.getState(), fieldName: 'newMpg', value: 20 },
Expand Down Expand Up @@ -48,7 +46,7 @@ describe('Store', () => {
});

it('should not display results when necessary data is not provided', () => {
const store = createStore(rootReducer, initialState);
const store = configureStore();

const actions = [
{ type: ActionTypes.CALCULATE_FUEL_SAVINGS, dateModified, settings: store.getState(), fieldName: 'newMpg', value: 20 },
Expand Down Expand Up @@ -82,7 +80,7 @@ describe('Store', () => {


it('should handle a flurry of actions', () => {
const store = createStore(rootReducer, initialState);
const store = configureStore();

const actions = [
{ type: ActionTypes.CALCULATE_FUEL_SAVINGS, dateModified, settings: store.getState(), fieldName: 'newMpg', value: 20 },
Expand Down

0 comments on commit 4fad0e5

Please sign in to comment.