@@ -8,7 +8,7 @@ new ClientEventBus().start()
8
8
const clientBusEmitTarget = window
9
9
describe ( 'EventClient' , ( ) => {
10
10
describe ( 'debug config' , ( ) => {
11
- it ( 'should emit logs when debug set to true and have the correct plugin name' , async ( ) => {
11
+ it ( 'should emit logs when debug set to true and have the correct plugin name' , ( ) => {
12
12
const consoleSpy = vi . spyOn ( console , 'log' )
13
13
new EventClient ( {
14
14
debug : true ,
@@ -54,7 +54,7 @@ describe('EventClient', () => {
54
54
const targetEmitSpy = vi . spyOn ( target , 'dispatchEvent' )
55
55
const targetListenSpy = vi . spyOn ( target , 'addEventListener' )
56
56
const targetRemoveSpy = vi . spyOn ( target , 'removeEventListener' )
57
- const cleanup = client . on ( 'test:event' , ( ) => { } )
57
+ const cleanup = client . on ( 'test:event' , ( ) => { } )
58
58
cleanup ( )
59
59
client . emit ( 'test:event' , { foo : 'bar' } )
60
60
expect ( targetEmitSpy ) . toHaveBeenCalledWith ( expect . any ( Event ) )
@@ -78,7 +78,7 @@ describe('EventClient', () => {
78
78
const targetEmitSpy = vi . spyOn ( target , 'dispatchEvent' )
79
79
const targetListenSpy = vi . spyOn ( target , 'addEventListener' )
80
80
const targetRemoveSpy = vi . spyOn ( target , 'removeEventListener' )
81
- const cleanup = client . on ( 'test:event' , ( ) => { } )
81
+ const cleanup = client . on ( 'test:event' , ( ) => { } )
82
82
cleanup ( )
83
83
client . emit ( 'test:event' , { foo : 'bar' } )
84
84
expect ( targetEmitSpy ) . toHaveBeenCalledWith ( expect . any ( Event ) )
@@ -101,7 +101,7 @@ describe('EventClient', () => {
101
101
} )
102
102
103
103
const eventBusSpy = vi . spyOn ( clientBusEmitTarget , 'addEventListener' )
104
- client . on ( 'event' , ( ) => { } )
104
+ client . on ( 'event' , ( ) => { } )
105
105
expect ( eventBusSpy ) . toHaveBeenCalledWith (
106
106
'test:event' ,
107
107
expect . any ( Function ) ,
0 commit comments