File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
packages/signals/signals/src/plugin/__tests__ Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1+ import {
2+ createInteractionSignal ,
3+ createUserDefinedSignal ,
4+ } from '../../types/factories'
15import { SignalsPlugin } from '../signals-plugin'
26
37// this specific test was throwing a bunch of warnings:
@@ -41,10 +45,10 @@ describe(SignalsPlugin, () => {
4145
4246 test ( 'addSignal method emits signal' , async ( ) => {
4347 const plugin = new SignalsPlugin ( )
44- const signal = { data : 'test ' } as any
48+ const signal = createUserDefinedSignal ( { foo : 'bar ' } )
4549 const emitterSpy = jest . spyOn ( plugin . signals . signalEmitter , 'emit' )
4650 plugin . addSignal ( signal )
4751 expect ( emitterSpy ) . toHaveBeenCalledTimes ( 1 )
48- expect ( emitterSpy . mock . calls [ 0 ] [ 0 ] ) . toEqual ( { data : 'test' } )
52+ expect ( emitterSpy . mock . calls [ 0 ] [ 0 ] ) . toEqual ( signal )
4953 } )
5054} )
You can’t perform that action at this time.
0 commit comments