Automatically reconnect single ADB head unit

This commit is contained in:
2026-07-31 19:25:32 +02:00
parent 3e3e0010d6
commit 0a0dae144c
12 changed files with 103 additions and 29 deletions
+2 -2
View File
@@ -11,8 +11,8 @@ describe("ADB configuration", () => {
});
});
it("requires a constrained serial when enabled", () => {
expect(() => loadConfig({ NODE_ENV: "test", ADB_ENABLED: "true" })).toThrow("ADB_SERIAL is required");
it("supports automatic discovery or a constrained pinned serial when enabled", () => {
expect(loadConfig({ NODE_ENV: "test", ADB_ENABLED: "true" }).adb).toMatchObject({ enabled: true, serial: null });
expect(() =>
loadConfig({ NODE_ENV: "test", ADB_ENABLED: "true", ADB_SERIAL: "serial; shell command" })
).toThrow();