mirror of
https://github.com/pion/webrtc.git
synced 2025-09-27 03:25:58 +08:00

The tests are run in a Node.js environment, and this does not include any browser tests. This requires the wrtc package from npm as well as a shim which adds portions of the WebRTC API to the global scope. Some tests introduced here can be combined when differences between the Go API and the WASM bindings are addressed and as missing features are added to the WASM bindings. We can and should add more tests in the future to improve test coverage. This should be considered the minimum number of tests reuqired to ensure basic functionality is working.
11 lines
273 B
JavaScript
11 lines
273 B
JavaScript
// This file adds RTCPeerConnection to the global context, making Node.js more
|
|
// closely match the browser API for WebRTC.
|
|
|
|
const wrtc = require("wrtc");
|
|
|
|
global.window = {
|
|
RTCPeerConnection: wrtc.RTCPeerConnection
|
|
};
|
|
|
|
global.RTCPeerConnection = wrtc.RTCPeerConnection;
|