Fixed re-enabling a still selected plugin
Summary: While testing manually discovered the sandy plugin infra din't cover the case that a plugin can be selected but not enabled at the same time. Added test and fixed that. Reviewed By: nikoant Differential Revision: D22308597 fbshipit-source-id: 6cef2b543013ee81cee449396d523dd9a657ad1c
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d16c6061c1
commit
581ddafd18
@@ -117,8 +117,12 @@ export function startPlugin<Module extends FlipperPluginModule<any>>(
|
||||
// as from testing perspective the difference shouldn't matter
|
||||
return false;
|
||||
},
|
||||
initPlugin(_pluginId: string) {},
|
||||
deinitPlugin(_pluginId: string) {},
|
||||
initPlugin(_pluginId: string) {
|
||||
pluginInstance.connect();
|
||||
},
|
||||
deinitPlugin(_pluginId: string) {
|
||||
pluginInstance.disconnect();
|
||||
},
|
||||
call(
|
||||
api: string,
|
||||
method: string,
|
||||
@@ -131,7 +135,7 @@ export function startPlugin<Module extends FlipperPluginModule<any>>(
|
||||
|
||||
const pluginInstance = new SandyPluginInstance(fakeFlipper, definition);
|
||||
// we start connected
|
||||
pluginInstance.connect();
|
||||
pluginInstance.activate();
|
||||
|
||||
const res: StartPluginResult<Module> = {
|
||||
module,
|
||||
|
||||
Reference in New Issue
Block a user