Remove some unhandled rejections in tests

Summary: Fixed several tests that caused uncaught promise rejects to fire after the tests finished. This caused jest to fail if there are too many of them.

Reviewed By: aigoncharov

Differential Revision: D32118124

fbshipit-source-id: 50734dab6dee2efec7f056940af72858b27b1707
This commit is contained in:
Michel Weststrate
2021-11-03 03:12:39 -07:00
committed by Facebook GitHub Bot
parent 8f3e729b7b
commit 72ce759e61
7 changed files with 55 additions and 30 deletions

View File

@@ -334,8 +334,10 @@ export function startDevicePlugin<Module extends FlipperDevicePluginModule>(
},
};
(res as any)._backingInstance = pluginInstance;
// we start connected
pluginInstance.activate();
if (!options?.startUnactivated) {
// we start connected
pluginInstance.activate();
}
return res;
}