Files
flipper/desktop/flipper-ui-core/src/test-utils/TestDevice.tsx
Michel Weststrate eed19b3a3d Move FlipperServer initialisation out of flipper-core
Summary: This diff makes sure flipper-ui-core no longer depends on flipper-server-core. Currently server config is still transferred from UI to server, which doesn't really make sense in future scenarios where server might start before client, but will address that separately

Reviewed By: timur-valiev, aigoncharov

Differential Revision: D32462835

fbshipit-source-id: 498a944256ba1aabbf963b896953e64d11e27214
2021-12-08 04:30:54 -08:00

40 lines
790 B
TypeScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
*/
import {DeviceOS, DeviceType} from 'flipper-plugin';
import {DeviceSpec} from 'flipper-plugin-lib';
import BaseDevice from '../devices/BaseDevice';
export class TestDevice extends BaseDevice {
constructor(
serial: string,
deviceType: DeviceType,
title: string,
os: DeviceOS,
specs?: DeviceSpec[],
) {
super(
{
async start() {},
on: jest.fn(),
off: jest.fn(),
exec: jest.fn(),
close: jest.fn(),
},
{
serial,
deviceType,
title,
os,
specs,
},
);
}
}