From 7b1e01ed6beb60cb565fe9bf264de75fd46ea20a Mon Sep 17 00:00:00 2001
From: AAA <35992542+TNTcraftHIM@users.noreply.github.com>
Date: Fri, 21 Aug 2026 06:05:59 +0800
Subject: [PATCH] test(native): cover current H264 source mappings (#111)
---
tests/native-hardware-status.test.ts | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/tests/native-hardware-status.test.ts b/tests/native-hardware-status.test.ts
index 5427c53..1e7587b 100644
--- a/tests/native-hardware-status.test.ts
+++ b/tests/native-hardware-status.test.ts
@@ -34,9 +34,12 @@ describe("native sender hardware preference contract", () => {
expect(retainsHardwarePreference(null)).toBe(false);
});
- it("keeps VP8 default, one encoder, and an explicit unverified hardware boundary", () => {
+ it("keeps VP8 default, maps browser/native H.264, and retains one encoder", () => {
expect(senderHTML).toContain('');
- expect(senderUI).toContain('elements.codec?.value === "h264" ? "h264" : "vp8"');
+ expect(senderHTML).toContain('');
+ expect(senderHTML).toContain('');
+ expect(senderUI).toContain('elements.codec?.value === "h264" || elements.codec?.value === "native-h264" ? "h264" : "vp8"');
+ expect(senderUI).toContain('elements.codec?.value === "native-h264" ? "native-window-h264" : "browser"');
expect(senderUI).toContain('codec: codec === "h264" ? "avc1.42c01f" : "vp8"');
expect(senderUI).toContain("metrics.codec = codec");
expect(senderUI).toContain("codecLabel(metrics.codec)");