Skip to content

Commit 1820f08

Browse files
ci: apply automated fixes
1 parent 042158f commit 1820f08

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

packages/event-bus-client/tests/index.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { describe, expect, it, vi } from 'vitest'
22
import { ClientEventBus } from '@tanstack/devtools-event-bus/client'
33
import { 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
77
const bus = new ClientEventBus()
88
bus.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),

packages/event-bus/tests/index.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
import { afterEach, describe, expect, it, vi } from 'vitest'
22
import { ClientEventBus } from '../src/client'
33

4-
vi.spyOn(BroadcastChannel.prototype, 'postMessage').mockImplementation(() => { })
4+
vi.spyOn(BroadcastChannel.prototype, 'postMessage').mockImplementation(() => {})
55
describe('ClientEventBus', () => {
66
describe('debug', () => {
77
afterEach(() => {
88
vi.restoreAllMocks()
99
})
1010
it('should log events to the console when debug set to true', () => {
11-
const logSpy = vi.spyOn(console, 'log').mockImplementation(() => { })
11+
const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {})
1212
const clientBus = new ClientEventBus({ debug: true })
1313
clientBus.start()
1414

@@ -21,7 +21,7 @@ describe('ClientEventBus', () => {
2121
})
2222

2323
it('should not log events to the console when debug set to false', () => {
24-
const logSpy = vi.spyOn(console, 'log').mockImplementation(() => { })
24+
const logSpy = vi.spyOn(console, 'log').mockImplementation(() => {})
2525
const clientBus = new ClientEventBus({ debug: false })
2626
clientBus.start()
2727

0 commit comments

Comments
 (0)