From 4ff045fff7b882d7d8886e4f3060db79dbf0c4f6 Mon Sep 17 00:00:00 2001 From: snekxs <26660858+snekxs@users.noreply.github.com> Date: Sun, 11 Oct 2026 18:48:19 -0600 Subject: [PATCH] test: lock shared-PID routing for Noir devices reporting 0x2255 --- src/supported-devices-crosscheck.test.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/supported-devices-crosscheck.test.ts b/src/supported-devices-crosscheck.test.ts index 72975560..ccc1f751 100644 --- a/src/supported-devices-crosscheck.test.ts +++ b/src/supported-devices-crosscheck.test.ts @@ -101,6 +101,30 @@ test("M2-NEX resolves by product name since its row pins no PIDs", () => { assert.match(result.detail, /already listed as Supported/); }); +test("M2-NEX reporting PID 0x2255 routes to the shared K-snake X11 row", () => { + // 0x2255 is pinned only on K-snake X11 (shared OEM PID); the Noir M2-NEX + // row matches by product name. PID wins when the device reports it. + const result = crosscheckSupportedDevices( + device({ brand: "Noir Gear", name: "M2-NEX", vendorId: 0xa8a4, productId: 0x2255 }), + "pass", + ); + assert.equal(result.listed, true); + assert.equal(result.matchedBy, "pid"); + assert.equal(result.status, "supported"); + assert.equal(result.pageModel, "X11"); +}); + +test("NOIR E1 reporting PID 0x2255 follows the shared PID to K-snake X11", () => { + const result = crosscheckSupportedDevices( + device({ brand: "Noir Gear", name: "NOIR E1", vendorId: 0xa8a4, productId: 0x2255 }), + "pass", + ); + assert.equal(result.listed, true); + assert.equal(result.matchedBy, "pid"); + assert.equal(result.status, "supported"); + assert.equal(result.pageModel, "X11"); +}); + test("NOIR E1 has no row since upstream removed it", () => { const result = crosscheckSupportedDevices( device({ brand: "Noir Gear", name: "NOIR E1", vendorId: 0xa8a4, productId: null }),