@mertushka/webrtc-node 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+
3
+ const path = require("node:path");
4
+ const { spawnSync } = require("node:child_process");
5
+
6
+ const root = path.resolve(__dirname, "..");
7
+ const selectors = [
8
+ "webrtc/RTCPeerConnection-createOffer.html#createOffer() returns RTCSessionDescriptionInit",
9
+ "webrtc/RTCDataChannel-send.html#Datachannel should be able to send simple string and receive as string",
10
+ "webrtc/RTCDataChannel-close.html#Repeated open/send/echo/close datachannel works",
11
+ "webrtc/RTCPeerConnection-iceGatheringState.html?interop-2026#connection with one data channel should eventually have connected connection state",
12
+ ];
13
+
14
+ const result = spawnSync(
15
+ process.execPath,
16
+ [path.join(__dirname, "run-wpt-subset.js"), ...selectors],
17
+ {
18
+ cwd: root,
19
+ env: process.env,
20
+ stdio: "inherit",
21
+ },
22
+ );
23
+
24
+ if (result.error) {
25
+ console.error(result.error.message);
26
+ process.exit(1);
27
+ }
28
+ if (result.signal) {
29
+ console.error(`WPT smoke terminated by ${result.signal}`);
30
+ process.exit(1);
31
+ }
32
+ process.exit(result.status ?? 1);