Make sure Sandy Device Plugins can be unit testsed

Summary: Add unit tests to verify that the unit test utilities for for Sandy device plugins work as expected. Fixed a bug revealed by that and cleaned up some TODO's

Reviewed By: jknoxville, passy, nikoant

Differential Revision: D22693928

fbshipit-source-id: 93162db19d826d0cd7f642cef1447fd756261ac8
This commit is contained in:
Michel Weststrate
2020-08-04 07:05:57 -07:00
committed by Facebook GitHub Bot
parent 91ed4e31c0
commit 1e956e1bf5
5 changed files with 249 additions and 24 deletions

View File

@@ -251,7 +251,7 @@ export function startDevicePlugin<Module extends FlipperDevicePluginModule>(
createMockPluginDetails(),
module,
);
if (definition.isDevicePlugin) {
if (!definition.isDevicePlugin) {
throw new Error(
'Use `startPlugin` or `renderPlugin` to test non-device plugins',
);