@@ -2,7 +2,7 @@ import { describe, expect, it, vi } from 'vitest'
22import { ClientEventBus } from '@tanstack/devtools-event-bus/client'
33import { EventClient } from '../src'
44
5- vi . spyOn ( BroadcastChannel . prototype , 'postMessage' ) . mockImplementation ( ( ) => { } )
5+ vi . spyOn ( BroadcastChannel . prototype , 'postMessage' ) . mockImplementation ( ( ) => { } )
66// start the client bus for testing
77const bus = new ClientEventBus ( )
88bus . start ( )
@@ -56,7 +56,7 @@ describe('EventClient', () => {
5656 const targetEmitSpy = vi . spyOn ( target , 'dispatchEvent' )
5757 const targetListenSpy = vi . spyOn ( target , 'addEventListener' )
5858 const targetRemoveSpy = vi . spyOn ( target , 'removeEventListener' )
59- const cleanup = client . on ( 'test:event' , ( ) => { } )
59+ const cleanup = client . on ( 'test:event' , ( ) => { } )
6060 cleanup ( )
6161 client . emit ( 'test:event' , { foo : 'bar' } )
6262 expect ( targetEmitSpy ) . toHaveBeenCalledWith ( expect . any ( Event ) )
@@ -80,7 +80,7 @@ describe('EventClient', () => {
8080 const targetEmitSpy = vi . spyOn ( target , 'dispatchEvent' )
8181 const targetListenSpy = vi . spyOn ( target , 'addEventListener' )
8282 const targetRemoveSpy = vi . spyOn ( target , 'removeEventListener' )
83- const cleanup = client . on ( 'test:event' , ( ) => { } )
83+ const cleanup = client . on ( 'test:event' , ( ) => { } )
8484 cleanup ( )
8585 client . emit ( 'test:event' , { foo : 'bar' } )
8686 expect ( targetEmitSpy ) . toHaveBeenCalledWith ( expect . any ( Event ) )
@@ -103,7 +103,7 @@ describe('EventClient', () => {
103103 } )
104104
105105 const eventBusSpy = vi . spyOn ( clientBusEmitTarget , 'addEventListener' )
106- client . on ( 'event' , ( ) => { } )
106+ client . on ( 'event' , ( ) => { } )
107107 expect ( eventBusSpy ) . toHaveBeenCalledWith (
108108 'test:event' ,
109109 expect . any ( Function ) ,
0 commit comments