Added test cases for flipper import and export
Summary: Adds tests for flipper import and export. Also fixed few edge cases which was discovered through tests. The edge case was that it didn't export device plugin states. Reviewed By: danielbuechele Differential Revision: D13828357 fbshipit-source-id: ddc4352b729ca7f05c5875f2f3fbdd2c7f4e2186
This commit is contained in:
committed by
Facebook Github Bot
parent
5ef970e5b5
commit
cbd70f573c
@@ -27,6 +27,11 @@ export type ClientQuery = {|
|
||||
device_id: string,
|
||||
|};
|
||||
|
||||
export type ClientExport = {|
|
||||
id: string,
|
||||
query: ClientQuery,
|
||||
|};
|
||||
|
||||
type ErrorType = {message: string, stacktrace: string, name: string};
|
||||
type RequestMetadata = {method: string, id: number, params: ?Object};
|
||||
|
||||
@@ -271,7 +276,7 @@ export default class Client extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
toJSON() {
|
||||
toJSON(): ClientExport {
|
||||
return {id: this.id, query: this.query};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user