This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #644 from SuperViz/lab
New 2D presence controls and form input component
- Loading branch information
Showing
30 changed files
with
2,168 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,38 @@ | ||
import { jest } from '@jest/globals'; | ||
import * as Socket from '@superviz/socket-client'; | ||
|
||
export const MOCK_IO = { | ||
PresenceEvents: { | ||
JOINED_ROOM: 'presence.joined-room', | ||
LEAVE: 'presence.leave', | ||
ERROR: 'presence.error', | ||
UPDATE: 'presence.update', | ||
}, | ||
Realtime: class { | ||
public connection: { | ||
on: (state: string) => void; | ||
off: () => void; | ||
}; | ||
connection; | ||
|
||
constructor(apiKey: string, environment: string, participant: any) { | ||
constructor(apiKey, environment, participant) { | ||
this.connection = { | ||
on: jest.fn(), | ||
off: jest.fn(), | ||
}; | ||
} | ||
|
||
public connect() { | ||
connect() { | ||
return { | ||
on: jest.fn(), | ||
off: jest.fn(), | ||
emit: jest.fn(), | ||
disconnect: jest.fn(), | ||
history: jest.fn(), | ||
presence: { | ||
on: jest.fn(), | ||
off: jest.fn(), | ||
get: jest.fn(), | ||
update: jest.fn(), | ||
}, | ||
}; | ||
} | ||
|
||
public destroy() {} | ||
destroy() {} | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.