File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
libs/state/actions/src/lib Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -102,9 +102,11 @@ describe('actions fn', () => {
102
102
const t = { se : ( ) => void 0 } ;
103
103
const spyBehavior = jest . fn ( ) ;
104
104
const dummyBehaviour = ( o$ ) => o$ . pipe ( tap ( spyBehavior ) ) ;
105
- const spyT = jest . fn ( ( _ : any ) => void 0 ) ;
106
105
107
- const sub = component . actions . onProp ( dummyBehaviour , spyT ) ;
106
+ const sub = component . actions . onProp ( dummyBehaviour ) ;
107
+ component . actions . prop ( 'p' ) ;
108
+ expect ( spyBehavior ) . toHaveBeenCalledTimes ( 1 ) ;
109
+ sub ( ) ;
108
110
component . actions . prop ( 'p' ) ;
109
111
expect ( spyBehavior ) . toHaveBeenCalledTimes ( 1 ) ;
110
112
} ) ;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export type ActionObservables<T extends Actions> = {
51
51
export type ActionEffects < T extends Actions , O = T > = {
52
52
[ K in ExtractString < T > as `on${Capitalize < K > } `] : (
53
53
fn : OperatorFunction < T [ K ] , T [ K ] | any > ,
54
- sideEffectFn : ( value : T [ K ] | any ) => void
54
+ sideEffectFn ? : ( value : T [ K ] | any ) => void
55
55
) => ( ) => void ;
56
56
} ;
57
57
You can’t perform that action at this time.
0 commit comments