Testing dev environment and examples to run #1075
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I would like to create a consistent environment to test some of the features of this library with actual browser API exposed. The tests that are currently made using jest (and the old ones using chai) failed due to timeout because createOffer is not being a valid function on the mocked RTCPeerConnection object.
It may be a better approach to simply host an environment that runs in the browser and test its endpoints or validate objects using a browser based testing framework.
So far its just a scaffold of what this environment might look like but I wish to recreate a similar version of what exists in
https://github.com/webrtc/samples.
I may start with a sample for Dataconnection in a similar vein as https://webrtc.github.io/samples/src/content/datachannel/filetransfer/ as that is what I'm primarily looking to use (see #1074).
I can understand stripping away vite for this and going for a barebones vanilla environment but I just saw it as the most convenient way to do module imports locally as well as support any other imports that might need to happen.
Also, just chose vanilla as that would simply be the most agnostic but I'm open to relying on any framework of choice.
Any feedback would be appreciated and taken into consideration :)