File tree Expand file tree Collapse file tree 2 files changed +6
-9
lines changed
packages/node_modules/overmind/src Expand file tree Collapse file tree 2 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -135,10 +135,7 @@ export function createOvermindMock<Config extends IConfiguration>(
135135 } has not been mocked`
136136 )
137137 }
138- return mockedEffect [ effect . method ] ( {
139- path : effect . name + '.' + effect . method ,
140- args : effect . args ,
141- } )
138+ return mockedEffect [ effect . method ] ( ...effect . args )
142139 } ,
143140 actionCallback : ( execution ) => {
144141 return execution . flush ( ) . mutations
Original file line number Diff line number Diff line change @@ -9,10 +9,10 @@ describe('Mock', () => {
99 foo : 'bar' ,
1010 }
1111 const test : Action = ( { state, effects } ) => {
12- state . foo = effects . effect ( )
12+ state . foo = effects . effect ( 'bar2' )
1313 }
1414 const actions = { test }
15- const effect = ( ) => 'bar2'
15+ const effect = ( arg : string ) => arg
1616 const effects = { effect }
1717 const config = {
1818 state,
@@ -25,8 +25,8 @@ describe('Mock', () => {
2525 interface Action < Input = void > extends IAction < Config , Input > { }
2626
2727 const overmind = createOvermindMock ( config , {
28- effect ( ) {
29- return 'bar3 '
28+ effect ( arg ) {
29+ return arg + '!!! '
3030 } ,
3131 } )
3232
@@ -36,7 +36,7 @@ describe('Mock', () => {
3636 {
3737 method : 'set' ,
3838 path : 'foo' ,
39- args : [ 'bar3 ' ] ,
39+ args : [ 'bar2!!! ' ] ,
4040 } ,
4141 ] )
4242 } )
You can’t perform that action at this time.
0 commit comments