redux-mock-store
Advanced tools
Comparing version 1.1.1 to 1.1.2
@@ -11,13 +11,13 @@ // Type definitions for Redux Mock Store v1.0.2 | ||
import {Store, Middleware, Unsubscribe} from 'redux'; | ||
import {Store} from 'redux'; | ||
interface MockStore<S> extends Store<S> { | ||
getState():S; | ||
interface MockStore extends Store { | ||
getState():any; | ||
getActions():Array<any>; | ||
dispatch(action:any):any; | ||
clearActions():void; | ||
subscribe(listener: Function):Unsubscribe; | ||
subscribe():any; | ||
} | ||
declare function configureStore<S>(...middlewares:any[]):(...args:any[]) => MockStore<S>; | ||
declare function configureStore(...args:any[]):(...args:any[]) => MockStore; | ||
export = configureStore; |
@@ -41,3 +41,3 @@ 'use strict'; | ||
if (typeof action.type === 'undefined') { | ||
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant?'); | ||
throw new Error('Actions may not have an undefined "type" property. ' + 'Have you misspelled a constant? ' + 'Action: ' + JSON.stringify(action)); | ||
} | ||
@@ -44,0 +44,0 @@ |
{ | ||
"name": "redux-mock-store", | ||
"version": "1.1.1", | ||
"version": "1.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -7,3 +7,3 @@ [![Circle CI](https://circleci.com/gh/arnaudbenard/redux-mock-store/tree/master.svg?style=svg)](https://circleci.com/gh/arnaudbenard/redux-mock-store/tree/master) | ||
A mock store for your testing your redux async action creators and middleware. The mock store will store the dispatched actions in an array to be used in your tests. | ||
A mock store for testing your redux async action creators and middleware. The mock store will store the dispatched actions in an array to be used in your tests. | ||
@@ -10,0 +10,0 @@ ## Old version documentation (`< 1.x.x`) |
@@ -41,3 +41,5 @@ import expect from 'expect'; | ||
'Actions may not have an undefined "type" property. ' + | ||
'Have you misspelled a constant?' | ||
'Have you misspelled a constant? '+ | ||
'Action: ' + | ||
'{"types":"ADD_ITEM"}' | ||
); | ||
@@ -44,0 +46,0 @@ }); |
10132
181