From 4e2e23e3b436d8afba73fdd68055863264a80093 Mon Sep 17 00:00:00 2001 From: Luke De Feo Date: Thu, 7 Jul 2022 07:50:14 -0700 Subject: [PATCH] Added ability to override device paramters in Deviceplugin test utils Summary: This allows for more controlled device plugin tests Reviewed By: mweststrate Differential Revision: D37609991 fbshipit-source-id: 7e0694ba97e6b2c34b5d9cd81761eecd2f50c6f9 --- desktop/flipper-plugin/src/test-utils/test-utils.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/desktop/flipper-plugin/src/test-utils/test-utils.tsx b/desktop/flipper-plugin/src/test-utils/test-utils.tsx index e943e6175..2429ed91c 100644 --- a/desktop/flipper-plugin/src/test-utils/test-utils.tsx +++ b/desktop/flipper-plugin/src/test-utils/test-utils.tsx @@ -62,6 +62,7 @@ interface StartPluginOptions { * Provide a set of GKs that are enabled in this test. */ GKs?: string[]; + testDevice?: Device; } type ExtractClientType> = Parameters< @@ -587,6 +588,7 @@ function createMockDevice(options?: StartPluginOptions): Device & { }, deviceType: 'emulator', serial: 'serial-000', + ...options?.testDevice, isArchived: !!options?.isArchived, connected: createState(true), addLogListener(cb) {