Cleanup and some code reuse between Device- and normal Plugins
Summary: Introducing a base abstract class (blegh) to share some life cycle management between Device- and normal plugins. Cleaned up the test utils a bit as well + some old TODO's that now have been taken care of Reviewed By: nikoant Differential Revision: D22727089 fbshipit-source-id: 507816f1bfdbc6e7e71d4bd365b881b6710ca917
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b9c9e89b53
commit
642261c0d0
@@ -10,7 +10,7 @@
|
||||
import * as TestUtils from '../test-utils/test-utils';
|
||||
import * as testPlugin from './TestPlugin';
|
||||
import {createState} from '../state/atom';
|
||||
import {FlipperClient} from '../plugin/Plugin';
|
||||
import {PluginClient} from '../plugin/Plugin';
|
||||
import {DevicePluginClient} from '../plugin/DevicePlugin';
|
||||
|
||||
test('it can start a plugin and lifecycle events', () => {
|
||||
@@ -246,7 +246,7 @@ test('plugins cannot use a persist key twice', async () => {
|
||||
|
||||
test('plugins can receive deeplinks', async () => {
|
||||
const plugin = TestUtils.startPlugin({
|
||||
plugin(client: FlipperClient) {
|
||||
plugin(client: PluginClient) {
|
||||
client.onDeepLink((deepLink) => {
|
||||
if (typeof deepLink === 'string') {
|
||||
field1.set(deepLink);
|
||||
|
||||
Reference in New Issue
Block a user