@rstest/browser 0.10.6 → 0.11.1
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.
- package/dist/browser-container/container-static/js/{854.c59f71483d.js → 328.37af068e21.js} +2712 -2786
- package/dist/browser-container/container-static/js/328.37af068e21.js.LICENSE.txt +1 -0
- package/dist/browser-container/container-static/js/{index.fedc31dff3.js → index.c8fe4ff310.js} +58 -56
- package/dist/browser-container/index.html +1 -1
- package/dist/browser.js +1 -1
- package/dist/hostController.d.ts +17 -1
- package/dist/index.js +443 -365
- package/dist/protocol.d.ts +7 -1
- package/dist/providers/index.d.ts +3 -0
- package/package.json +7 -7
- package/src/client/entry.ts +25 -23
- package/src/client/formatConsole.ts +77 -0
- package/src/client/locator.ts +1 -5
- package/src/hostController.ts +671 -526
- package/src/protocol.ts +9 -5
- package/src/providers/index.ts +3 -0
- package/src/providers/playwright/runtime.ts +11 -6
- package/dist/browser-container/container-static/js/854.c59f71483d.js.LICENSE.txt +0 -1
- package/src/client/fakeTimersStub.ts +0 -91
- /package/dist/{626.js → 33.js} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! LICENSE: 328.37af068e21.js.LICENSE.txt */
|
package/dist/browser-container/container-static/js/{index.fedc31dff3.js → index.c8fe4ff310.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
(()=>{
|
|
2
2
|
"use strict";
|
|
3
3
|
var e, t, s, l, r, o, a = {
|
|
4
|
-
|
|
4
|
+
2076 (e, t, s) {
|
|
5
5
|
var l = s(9793);
|
|
6
6
|
let r = "__rstest_dispatch_response__";
|
|
7
|
-
var o = s(
|
|
7
|
+
var o = s(9968), a = s(7311), i = s(7125), n = s(405), c = s(7541);
|
|
8
8
|
let d = (e)=>{
|
|
9
9
|
let { message: t } = e;
|
|
10
10
|
return (0, l.jsx)("div", {
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
})
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
var u = s(
|
|
18
|
+
var u = s(5314), p = s(4068), h = s(771), f = s(2026), x = s(3534);
|
|
19
19
|
let m = (e, t)=>{
|
|
20
20
|
if (!t) return e;
|
|
21
21
|
let s = t.endsWith("/") ? t.slice(0, -1) : t;
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
}
|
|
33
33
|
}, "*"), fetch(`/__open-in-editor?file=${encodeURIComponent(e)}`).catch(()=>{});
|
|
34
34
|
};
|
|
35
|
-
var j = s(
|
|
35
|
+
var j = s(96), v = s(6432), y = s(3706), _ = s(9090), C = s(9781);
|
|
36
36
|
let w = {
|
|
37
37
|
idle: {
|
|
38
38
|
label: "Idle",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
})
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
|
-
var k = s(
|
|
82
|
-
let
|
|
81
|
+
var k = s(5665), S = s(9669), F = s(7707), N = s(6699), A = s(4560), P = s(5205), M = s(9872), z = s(9130);
|
|
82
|
+
let R = {
|
|
83
83
|
iPhoneSE: {
|
|
84
84
|
width: 375,
|
|
85
85
|
height: 667
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
width: 1280,
|
|
149
149
|
height: 800
|
|
150
150
|
}
|
|
151
|
-
},
|
|
151
|
+
}, O = {
|
|
152
152
|
iPhoneSE: "iPhone SE",
|
|
153
153
|
iPhoneXR: "iPhone XR",
|
|
154
154
|
iPhone12Pro: "iPhone 12 Pro",
|
|
@@ -166,7 +166,7 @@
|
|
|
166
166
|
SamsungGalaxyA51A71: "Samsung Galaxy A51/71",
|
|
167
167
|
NestHub: "Nest Hub",
|
|
168
168
|
NestHubMax: "Nest Hub Max"
|
|
169
|
-
},
|
|
169
|
+
}, U = [
|
|
170
170
|
"iPhoneSE",
|
|
171
171
|
"iPhoneXR",
|
|
172
172
|
"iPhone12Pro",
|
|
@@ -185,15 +185,15 @@
|
|
|
185
185
|
"NestHub",
|
|
186
186
|
"NestHubMax"
|
|
187
187
|
].map((e)=>{
|
|
188
|
-
let t =
|
|
188
|
+
let t = R[e];
|
|
189
189
|
return {
|
|
190
190
|
id: e,
|
|
191
|
-
label:
|
|
191
|
+
label: O[e],
|
|
192
192
|
width: t.width,
|
|
193
193
|
height: t.height
|
|
194
194
|
};
|
|
195
|
-
}),
|
|
196
|
-
let t =
|
|
195
|
+
}), E = new Set(U.map((e)=>e.id)), T = (e)=>"string" == typeof e && E.has(e), $ = (e)=>{
|
|
196
|
+
let t = U.find((t)=>t.id === e);
|
|
197
197
|
if (!t) throw Error(`Unknown device preset: ${e}`);
|
|
198
198
|
return t;
|
|
199
199
|
}, I = (e, t, s)=>Math.min(s, Math.max(t, e)), B = (e)=>{
|
|
@@ -214,7 +214,7 @@
|
|
|
214
214
|
value: "responsive",
|
|
215
215
|
label: "Responsive"
|
|
216
216
|
},
|
|
217
|
-
...
|
|
217
|
+
...U.map((e)=>{
|
|
218
218
|
let t;
|
|
219
219
|
return {
|
|
220
220
|
value: e.id,
|
|
@@ -514,7 +514,7 @@
|
|
|
514
514
|
]
|
|
515
515
|
});
|
|
516
516
|
};
|
|
517
|
-
var D = s(
|
|
517
|
+
var D = s(2117);
|
|
518
518
|
let G = (e)=>{
|
|
519
519
|
let { className: t, style: s, direction: r = "horizontal", children: o, autoSaveId: a, ...i } = e, c = n.Children.toArray(o).filter((e)=>n.isValidElement(e) && e.type === Z), d = n.useCallback(()=>{
|
|
520
520
|
if (!a) return null;
|
|
@@ -567,8 +567,7 @@
|
|
|
567
567
|
children: t
|
|
568
568
|
});
|
|
569
569
|
};
|
|
570
|
-
var L = s(
|
|
571
|
-
let J = (e)=>(0, l.jsxs)("svg", {
|
|
570
|
+
var L = s(1297), q = s(341), H = s(2206), J = (e)=>(0, l.jsxs)("svg", {
|
|
572
571
|
xmlns: "http://www.w3.org/2000/svg",
|
|
573
572
|
fill: "none",
|
|
574
573
|
viewBox: "0 0 217 200",
|
|
@@ -1461,7 +1460,8 @@
|
|
|
1461
1460
|
]
|
|
1462
1461
|
})
|
|
1463
1462
|
]
|
|
1464
|
-
})
|
|
1463
|
+
});
|
|
1464
|
+
let V = (e)=>{
|
|
1465
1465
|
let { theme: t, onThemeToggle: s, isConnected: r, token: o, counts: a } = e, [i, c] = (0, n.useState)(0), d = (0, n.useRef)(a);
|
|
1466
1466
|
(0, n.useEffect)(()=>{
|
|
1467
1467
|
let e = d.current;
|
|
@@ -1585,7 +1585,7 @@
|
|
|
1585
1585
|
]
|
|
1586
1586
|
});
|
|
1587
1587
|
};
|
|
1588
|
-
var X = s(
|
|
1588
|
+
var X = s(4385), K = s(1887), Y = s(8412), Q = s(8635), ee = s(8141), et = s(4778);
|
|
1589
1589
|
let es = (0, n.memo)((e)=>{
|
|
1590
1590
|
let { counts: t, isRunning: s } = e, r = s && 0 === t.running;
|
|
1591
1591
|
return (0, l.jsx)("div", {
|
|
@@ -1725,7 +1725,7 @@
|
|
|
1725
1725
|
]
|
|
1726
1726
|
});
|
|
1727
1727
|
};
|
|
1728
|
-
var er = s(
|
|
1728
|
+
var er = s(9573), eo = s(585), ea = s(5967), ei = s(5383), en = s(8903);
|
|
1729
1729
|
let ec = (e)=>`__project__${e}`, ed = (e, t)=>`${e}::suite::${t.join("::")}`, eu = (e, t)=>{
|
|
1730
1730
|
let s = e;
|
|
1731
1731
|
for(let e = 1; e <= t.length; e++)s = ed(s, t.slice(0, e));
|
|
@@ -2303,12 +2303,12 @@
|
|
|
2303
2303
|
8e3,
|
|
2304
2304
|
16e3,
|
|
2305
2305
|
3e4
|
|
2306
|
-
], eP = function(e, t, s) {
|
|
2306
|
+
], eP = (e, t)=>t && e.projectRunnerUrls?.[t] ? e.projectRunnerUrls[t] : e.runnerUrl, eM = function(e, t, s) {
|
|
2307
2307
|
let l = arguments.length > 3 && void 0 !== arguments[3] && arguments[3], r = arguments.length > 4 ? arguments[4] : void 0, o = new URL("/runner.html", t || window.location.origin);
|
|
2308
2308
|
return o.searchParams.set("testFile", e), s && o.searchParams.set("testNamePattern", s), r && o.searchParams.set("runId", r), l && o.searchParams.set("t", Date.now().toString()), o.toString();
|
|
2309
2309
|
};
|
|
2310
|
-
var
|
|
2311
|
-
let
|
|
2310
|
+
var ez = s(5999);
|
|
2311
|
+
let eR = function() {
|
|
2312
2312
|
for(var e = arguments.length, t = Array(e), s = 0; s < e; s++)t[s] = arguments[s];
|
|
2313
2313
|
window.__RSTEST_BROWSER_OPTIONS__?.debug === !0 && console.log(...t);
|
|
2314
2314
|
}, eO = (e)=>{
|
|
@@ -2317,7 +2317,7 @@
|
|
|
2317
2317
|
} catch {
|
|
2318
2318
|
return;
|
|
2319
2319
|
}
|
|
2320
|
-
},
|
|
2320
|
+
}, eU = (e)=>Array.from(document.querySelectorAll("iframe[data-test-file]")).find((t)=>t.dataset.testFile === e), eE = (e)=>{
|
|
2321
2321
|
let { options: t, theme: s, setTheme: a } = e, { token: i } = o.A.useToken(), [c, u] = (0, n.useState)([]), [p, h] = (0, n.useState)(null), [f, x] = (0, n.useState)({}), [m, g] = (0, n.useState)({}), [j, v] = (0, n.useState)([]), [y, _] = (0, n.useState)(""), [C, w] = (0, n.useState)({}), b = (0, n.useCallback)((e)=>{
|
|
2322
2322
|
let s = 5381;
|
|
2323
2323
|
for(let e = 0; e < t.rootPath.length; e++)s = 33 * s ^ t.rootPath.charCodeAt(e);
|
|
@@ -2380,9 +2380,9 @@
|
|
|
2380
2380
|
k
|
|
2381
2381
|
]);
|
|
2382
2382
|
let A = (0, n.useCallback)(async (e, s)=>{
|
|
2383
|
-
|
|
2383
|
+
eR("[Container] handleReloadTestFile called:", e, s), h(e);
|
|
2384
2384
|
let l = document.querySelector(`iframe[data-test-file="${e}"]`);
|
|
2385
|
-
if (
|
|
2385
|
+
if (eR("[Container] Found iframe:", l), !l) throw Error(`Cannot reload test file "${e}": iframe not found`);
|
|
2386
2386
|
let r = "function" == typeof globalThis.crypto?.randomUUID ? globalThis.crypto.randomUUID() : `run-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
|
|
2387
2387
|
w((t)=>({
|
|
2388
2388
|
...t,
|
|
@@ -2401,12 +2401,13 @@
|
|
|
2401
2401
|
[e]: l
|
|
2402
2402
|
};
|
|
2403
2403
|
});
|
|
2404
|
-
let o =
|
|
2405
|
-
return
|
|
2404
|
+
let o = eM(e, eP(t, l.getAttribute("data-test-project") ?? void 0), s, !1, r);
|
|
2405
|
+
return eR("[Container] Setting iframe.src to:", o), l.src = o, {
|
|
2406
2406
|
runId: r
|
|
2407
2407
|
};
|
|
2408
2408
|
}, [
|
|
2409
|
-
t.runnerUrl
|
|
2409
|
+
t.runnerUrl,
|
|
2410
|
+
t.projectRunnerUrls
|
|
2410
2411
|
]), { rpc: P, loading: M, connected: z } = ((e, t, s)=>{
|
|
2411
2412
|
let [l, r] = (0, n.useState)(null), [o, a] = (0, n.useState)(!0), [i, c] = (0, n.useState)(!1), d = (0, n.useRef)(e), u = (0, n.useRef)(s), p = (0, n.useRef)(null);
|
|
2412
2413
|
return (0, n.useEffect)(()=>{
|
|
@@ -2425,15 +2426,15 @@
|
|
|
2425
2426
|
p.current = e = new WebSocket((h = "https:" === window.location.protocol ? "wss:" : "ws:", `${h}//${window.location.hostname}:${t}`));
|
|
2426
2427
|
let f = new WeakMap, x = {
|
|
2427
2428
|
onTestFileUpdate (e) {
|
|
2428
|
-
|
|
2429
|
+
eR("[Container RPC] onTestFileUpdate called:", e), d.current(e);
|
|
2429
2430
|
},
|
|
2430
2431
|
async reloadTestFile (e, t) {
|
|
2431
|
-
if (
|
|
2432
|
+
if (eR("[Container RPC] reloadTestFile called:", e, t), !u.current) throw Error("reloadTestFile handler is not available");
|
|
2432
2433
|
return u.current(e, t);
|
|
2433
2434
|
}
|
|
2434
2435
|
};
|
|
2435
2436
|
e.onopen = ()=>{
|
|
2436
|
-
i && e && (
|
|
2437
|
+
i && e && (eR("[Container] WebSocket connected"), l = 0, c(!0), r(s = (0, ez.L)(x, {
|
|
2437
2438
|
timeout: -1,
|
|
2438
2439
|
post: (t)=>{
|
|
2439
2440
|
e?.readyState === WebSocket.OPEN && e.send(JSON.stringify(t));
|
|
@@ -2460,13 +2461,13 @@
|
|
|
2460
2461
|
}));
|
|
2461
2462
|
}, e.onclose = ()=>{
|
|
2462
2463
|
if (p.current !== e || !i) return;
|
|
2463
|
-
|
|
2464
|
+
eR("[Container] WebSocket disconnected"), s?.$close(Error("Container WebSocket disconnected")), r(null), c(!1);
|
|
2464
2465
|
let t = eA[Math.min(l, eA.length - 1)];
|
|
2465
|
-
|
|
2466
|
+
eR(`[Container] Reconnecting in ${t}ms (attempt ${l + 1})`), l++, o = setTimeout(()=>{
|
|
2466
2467
|
i && n();
|
|
2467
2468
|
}, t);
|
|
2468
2469
|
}, e.onerror = ()=>{
|
|
2469
|
-
i &&
|
|
2470
|
+
i && eR("[Container] WebSocket error");
|
|
2470
2471
|
};
|
|
2471
2472
|
};
|
|
2472
2473
|
return n(), ()=>{
|
|
@@ -2500,20 +2501,20 @@
|
|
|
2500
2501
|
c
|
|
2501
2502
|
]), (0, n.useEffect)(()=>{
|
|
2502
2503
|
P && z && P.onRunnerFramesReady(c.map((e)=>e.testPath)).catch((e)=>{
|
|
2503
|
-
|
|
2504
|
+
eR("[Container RPC] Failed to notify runner frames ready:", e);
|
|
2504
2505
|
});
|
|
2505
2506
|
}, [
|
|
2506
2507
|
P,
|
|
2507
2508
|
z,
|
|
2508
2509
|
c
|
|
2509
2510
|
]);
|
|
2510
|
-
let
|
|
2511
|
+
let R = (0, n.useCallback)((e)=>"pass" === e ? "pass" : "fail" === e ? "fail" : "skip" === e || "todo" === e ? "skip" : "running", []), O = (0, n.useCallback)((e)=>{
|
|
2511
2512
|
h(e);
|
|
2512
|
-
}, []),
|
|
2513
|
+
}, []), U = (0, n.useCallback)((e, t)=>{
|
|
2513
2514
|
let s = eS({
|
|
2514
2515
|
filePath: e,
|
|
2515
2516
|
test: t,
|
|
2516
|
-
status:
|
|
2517
|
+
status: R(t.status)
|
|
2517
2518
|
});
|
|
2518
2519
|
g((l)=>{
|
|
2519
2520
|
let r = l[e] ?? {};
|
|
@@ -2526,8 +2527,8 @@
|
|
|
2526
2527
|
};
|
|
2527
2528
|
});
|
|
2528
2529
|
}, [
|
|
2529
|
-
|
|
2530
|
-
]),
|
|
2530
|
+
R
|
|
2531
|
+
]), E = (0, n.useCallback)((e, t)=>{
|
|
2531
2532
|
g((s)=>{
|
|
2532
2533
|
let l = s[e] ?? {}, r = ((e)=>{
|
|
2533
2534
|
let { filePath: t, tests: s, previousCases: l } = e, r = {}, o = (e)=>{
|
|
@@ -2620,13 +2621,13 @@
|
|
|
2620
2621
|
}));
|
|
2621
2622
|
} else if ("case-result" === t.type) {
|
|
2622
2623
|
let e = t.payload;
|
|
2623
|
-
e?.testPath && (
|
|
2624
|
+
e?.testPath && (U(e.testPath, e), P?.onTestCaseResult(e));
|
|
2624
2625
|
} else if ("file-complete" === t.type) {
|
|
2625
2626
|
let s = t.payload, l = s.testPath;
|
|
2626
2627
|
if ("string" == typeof l) {
|
|
2627
2628
|
let t = ((e)=>{
|
|
2628
2629
|
if (e) return Array.from(document.querySelectorAll("iframe[data-test-file]")).find((t)=>t.contentWindow === e);
|
|
2629
|
-
})(e.source) ??
|
|
2630
|
+
})(e.source) ?? eU(l), r = (t ? eO(t) : void 0) ?? C[l], o = "pass" === s.status || "skip" === s.status;
|
|
2630
2631
|
x((e)=>({
|
|
2631
2632
|
...e,
|
|
2632
2633
|
[l]: o ? "pass" : "fail"
|
|
@@ -2635,7 +2636,7 @@
|
|
|
2635
2636
|
for (let e of s.results ?? [])e?.testId && (t[e.testId] = eS({
|
|
2636
2637
|
filePath: l,
|
|
2637
2638
|
test: e,
|
|
2638
|
-
status:
|
|
2639
|
+
status: R(e.status)
|
|
2639
2640
|
}));
|
|
2640
2641
|
return {
|
|
2641
2642
|
...e,
|
|
@@ -2659,7 +2660,7 @@
|
|
|
2659
2660
|
let s = t.payload;
|
|
2660
2661
|
if ("runner" === s.namespace && "file-ready" === s.method) {
|
|
2661
2662
|
let e = s.args;
|
|
2662
|
-
"string" == typeof e?.testPath && Array.isArray(e.tests) &&
|
|
2663
|
+
"string" == typeof e?.testPath && Array.isArray(e.tests) && E(e.testPath, e);
|
|
2663
2664
|
}
|
|
2664
2665
|
if ("runner" === s.namespace && "case-start" === s.method) {
|
|
2665
2666
|
let e = s.args;
|
|
@@ -2671,7 +2672,7 @@
|
|
|
2671
2672
|
return eb(t) && ek(t, "id") && ek(t, "kind") && ek(t, "method") && ek(t, "testPath") && ek(t, "runId") ? t : null;
|
|
2672
2673
|
})(s);
|
|
2673
2674
|
if (l) {
|
|
2674
|
-
let t =
|
|
2675
|
+
let t = eU(l.testPath), o = t ? eO(t) : void 0;
|
|
2675
2676
|
if (!o || l.runId !== o) {
|
|
2676
2677
|
let t, a;
|
|
2677
2678
|
null !== (t = e.source) && "function" == typeof t.postMessage && e.source.postMessage({
|
|
@@ -2692,11 +2693,11 @@
|
|
|
2692
2693
|
return window.addEventListener("message", e), ()=>window.removeEventListener("message", e);
|
|
2693
2694
|
}, [
|
|
2694
2695
|
p,
|
|
2695
|
-
|
|
2696
|
-
|
|
2696
|
+
U,
|
|
2697
|
+
R,
|
|
2697
2698
|
P,
|
|
2698
2699
|
C,
|
|
2699
|
-
|
|
2700
|
+
E,
|
|
2700
2701
|
$
|
|
2701
2702
|
]);
|
|
2702
2703
|
let L = (0, n.useMemo)(()=>{
|
|
@@ -2832,7 +2833,7 @@
|
|
|
2832
2833
|
token: i,
|
|
2833
2834
|
filterText: y,
|
|
2834
2835
|
onExpandChange: v,
|
|
2835
|
-
onSelect:
|
|
2836
|
+
onSelect: O,
|
|
2836
2837
|
onRerunFile: I,
|
|
2837
2838
|
onRerunTestCase: B
|
|
2838
2839
|
})
|
|
@@ -2884,8 +2885,9 @@
|
|
|
2884
2885
|
"data-test-file": e.testPath,
|
|
2885
2886
|
children: (0, l.jsx)("iframe", {
|
|
2886
2887
|
"data-test-file": e.testPath,
|
|
2888
|
+
"data-test-project": e.projectName,
|
|
2887
2889
|
title: `Test runner for ${(n = (s = e.testPath).split("/"))[n.length - 1] || s}`,
|
|
2888
|
-
src: o ?
|
|
2890
|
+
src: o ? eM(e.testPath, eP(t, e.projectName), void 0, !1, o) : "about:blank",
|
|
2889
2891
|
className: "block h-full w-full border-0",
|
|
2890
2892
|
style: {
|
|
2891
2893
|
background: i.colorBgContainer
|
|
@@ -2914,7 +2916,7 @@
|
|
|
2914
2916
|
]
|
|
2915
2917
|
})
|
|
2916
2918
|
});
|
|
2917
|
-
},
|
|
2919
|
+
}, eT = ()=>{
|
|
2918
2920
|
let e = window.__RSTEST_BROWSER_OPTIONS__, [t, s] = (0, n.useState)("dark"), [r, c] = (0, n.useState)("dark");
|
|
2919
2921
|
(0, n.useEffect)(()=>{
|
|
2920
2922
|
let e = window.matchMedia("(prefers-color-scheme: dark)"), t = (e)=>c(e.matches ? "dark" : "light");
|
|
@@ -2966,13 +2968,13 @@
|
|
|
2966
2968
|
})
|
|
2967
2969
|
})
|
|
2968
2970
|
});
|
|
2969
|
-
},
|
|
2971
|
+
}, e$ = ()=>{
|
|
2970
2972
|
let e = document.getElementById("root");
|
|
2971
2973
|
e && c.createRoot(e).render((0, l.jsx)(n.StrictMode, {
|
|
2972
|
-
children: (0, l.jsx)(
|
|
2974
|
+
children: (0, l.jsx)(eT, {})
|
|
2973
2975
|
}));
|
|
2974
2976
|
};
|
|
2975
|
-
"loading" === document.readyState ? document.addEventListener("DOMContentLoaded",
|
|
2977
|
+
"loading" === document.readyState ? document.addEventListener("DOMContentLoaded", e$) : e$();
|
|
2976
2978
|
}
|
|
2977
2979
|
}, i = {};
|
|
2978
2980
|
function n(e) {
|
|
@@ -3045,7 +3047,7 @@
|
|
|
3045
3047
|
}, (o = self.rspackChunk_rstest_browser_ui = self.rspackChunk_rstest_browser_ui || []).forEach(r.bind(null, 0)), o.push = r.bind(null, o.push.bind(o));
|
|
3046
3048
|
var c = n.O(void 0, [
|
|
3047
3049
|
"783",
|
|
3048
|
-
"
|
|
3049
|
-
], ()=>n(
|
|
3050
|
+
"328"
|
|
3051
|
+
], ()=>n(2076));
|
|
3050
3052
|
c = n.O(c);
|
|
3051
3053
|
})();
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<script>
|
|
13
13
|
window.__RSTEST_BROWSER_OPTIONS__ = __RSTEST_OPTIONS_PLACEHOLDER__;
|
|
14
14
|
</script>
|
|
15
|
-
<script defer src="/container-static/js/lib-react.62b27a21db.js"></script><script defer src="/container-static/js/
|
|
15
|
+
<script defer src="/container-static/js/lib-react.62b27a21db.js"></script><script defer src="/container-static/js/328.37af068e21.js"></script><script defer src="/container-static/js/index.c8fe4ff310.js"></script><link href="/container-static/css/index.0521ff95b1.css" rel="stylesheet"></head>
|
|
16
16
|
<body>
|
|
17
17
|
<div id="root"></div>
|
|
18
18
|
</body>
|
package/dist/browser.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DISPATCH_RESPONSE_TYPE, DISPATCH_RPC_BRIDGE_NAME as protocol_DISPATCH_RPC_BRIDGE_NAME, DISPATCH_RPC_REQUEST_TYPE as protocol_DISPATCH_RPC_REQUEST_TYPE, DISPATCH_MESSAGE_TYPE as protocol_DISPATCH_MESSAGE_TYPE, DISPATCH_NAMESPACE_BROWSER } from "./
|
|
1
|
+
import { DISPATCH_RESPONSE_TYPE, DISPATCH_RPC_BRIDGE_NAME as protocol_DISPATCH_RPC_BRIDGE_NAME, DISPATCH_RPC_REQUEST_TYPE as protocol_DISPATCH_RPC_REQUEST_TYPE, DISPATCH_MESSAGE_TYPE as protocol_DISPATCH_MESSAGE_TYPE, DISPATCH_NAMESPACE_BROWSER } from "./33.js";
|
|
2
2
|
const DEFAULT_RPC_TIMEOUT_MS = 30000;
|
|
3
3
|
const getRpcTimeout = ()=>window.__RSTEST_BROWSER_OPTIONS__?.rpcTimeout ?? DEFAULT_RPC_TIMEOUT_MS;
|
|
4
4
|
const pendingRequests = new Map();
|
package/dist/hostController.d.ts
CHANGED
|
@@ -18,7 +18,18 @@ type BrowserLazyCompilationConfig = {
|
|
|
18
18
|
address: () => ReturnType<import('node:net').Server['address']>;
|
|
19
19
|
} | null) => number;
|
|
20
20
|
export declare const createBrowserLazyCompilationConfig: (setupFiles: string[]) => BrowserLazyCompilationConfig;
|
|
21
|
-
|
|
21
|
+
/**
|
|
22
|
+
* HMR — and the lazyCompilation transport it carries — is wired only for headed
|
|
23
|
+
* watch, the sole path that reuses a persistent page and applies module updates
|
|
24
|
+
* in place. Headless always loads each test file in a fresh page (pulling the
|
|
25
|
+
* latest incrementally-built chunks over HTTP), and one-shot runs never rerun,
|
|
26
|
+
* so pushing HMR updates there is dead weight that only races factory
|
|
27
|
+
* registration for chunk-split node_modules (rspack#11922) and lets
|
|
28
|
+
* lazyCompilation's accept-chain walk abort the next spec when no boundary
|
|
29
|
+
* exists (#1472). Disabling HMR does not make watch rebuilds any less
|
|
30
|
+
* incremental — HMR is only the client push transport.
|
|
31
|
+
*/ export declare const shouldEnableBrowserHmr: (isWatchMode: boolean, isHeadless: boolean) => boolean;
|
|
32
|
+
export declare const createBrowserRsbuildDevConfig: (enableHmr: boolean) => {
|
|
22
33
|
writeToDisk: boolean;
|
|
23
34
|
hmr: boolean;
|
|
24
35
|
client: {
|
|
@@ -26,6 +37,11 @@ export declare const createBrowserRsbuildDevConfig: (_isWatchMode: boolean) => {
|
|
|
26
37
|
};
|
|
27
38
|
};
|
|
28
39
|
export declare const createBrowserContextExcludeRegExp: (patterns: string[], projectRoot: string) => RegExp | null;
|
|
40
|
+
// Host-side mirror of the browser runtime's `toContextKey` (client/entry.ts):
|
|
41
|
+
// `./<path-relative-to-project-root>` with forward slashes. The runtime derives
|
|
42
|
+
// the same key from the target test file, so the non-watch import map below must
|
|
43
|
+
// key by the identical form for `loadTest(key)` to resolve.
|
|
44
|
+
export declare const toContextKey: (filePath: string, projectRootPosix: string) => string;
|
|
29
45
|
// ============================================================================
|
|
30
46
|
// Main Entry Point
|
|
31
47
|
// ============================================================================
|