Expose isConnected and currentUser

Summary: Requested by antonk52 and MSYS team

Reviewed By: passy

Differential Revision: D44662243

fbshipit-source-id: 2bace476c4e79b6a05bfb89ddc3e6acb437c6c3b
This commit is contained in:
Andrey Goncharov
2023-04-04 05:26:31 -07:00
committed by Facebook GitHub Bot
parent f8a1f38c0a
commit 7f111a11de
6 changed files with 55 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ import {
FlipperPluginModule,
SandyPluginDefinition,
} from '../plugin/SandyPluginDefinition';
import {createState} from '../state/atom';
import {stubLogger} from '../utils/Logger';
declare const process: any;
@@ -80,6 +81,8 @@ export function createMockFlipperLib(options?: StartPluginOptions): FlipperLib {
graphGet: createStubFunction(),
graphPost: createStubFunction(),
isLoggedIn: createStubFunction(),
currentUser: () => createState(null),
isConnected: () => createState(true),
},
remoteServerContext: {
childProcess: {