Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

[MV-400] Add Jest and unit test workflow #86

Merged
merged 20 commits into from
Apr 13, 2023
Merged

Conversation

skyman503
Copy link
Contributor

@skyman503 skyman503 commented Apr 7, 2023

This changes introduces basic tests and github workflow. Following PRs will contain more unittests.

@skyman503 skyman503 changed the title Add Jest and unit test workflow DON' MERGE Add Jest and unit test workflow Apr 7, 2023
@skyman503 skyman503 changed the title DON' MERGE Add Jest and unit test workflow [MV-400] Add Jest and unit test workflow Apr 12, 2023
@skyman503 skyman503 marked this pull request as ready for review April 12, 2023 13:32
return {
connect: async (): Promise<void> => {
return new Promise<void>((resolve) => {
resolve();
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you put this in the mocks directory? also it's the same as joinRoom, so maybe de-duplicate this

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

example/src/VideoroomContext.tsx Outdated Show resolved Hide resolved
// noop
};

export enum VideoQuality {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there some way to import this from the real index.tsx? we're going to forget to change this here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added import and export for all of the enums


export const useMembraneServer = NOOP;
export const useRoomParticipants = NOOP;
export const useCameraState = NOOP;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better if the hooks returned objects with mocked data / functions. Users don't just call the hooks, they also read something from them

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

Copy link
Collaborator

@graszka22 graszka22 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👏

@skyman503 skyman503 merged commit 1f24548 into master Apr 13, 2023
@skyman503 skyman503 deleted the @skyman503/MV-400 branch April 13, 2023 10:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants