Skip to content

Commit 55bca7c

Browse files
committed
fix spy
1 parent e602916 commit 55bca7c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/js-server-sdk/tests/config-validation.test.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,11 @@ describe('FishjamClient constructor sync validation', () => {
2828
});
2929

3030
describe('FishjamClient live credential checks (mocked)', () => {
31-
let getAllRoomsSpy: ReturnType<typeof vi.spyOn>;
31+
const spy = () => vi.spyOn(RoomsApi.prototype, 'getAllRooms');
32+
let getAllRoomsSpy: ReturnType<typeof spy>;
3233

3334
beforeEach(() => {
34-
getAllRoomsSpy = vi.spyOn(RoomsApi.prototype, 'getAllRooms');
35+
getAllRoomsSpy = spy();
3536
});
3637

3738
afterEach(() => {

0 commit comments

Comments
 (0)