Skip to content

Commit 32af95b

Browse files
committed
wip
1 parent f7d59fa commit 32af95b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

packages/signals/signals/src/plugin/__tests__/signals-plugin.test.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import {
2+
createInteractionSignal,
3+
createUserDefinedSignal,
4+
} from '../../types/factories'
15
import { 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
})

0 commit comments

Comments
 (0)