make it easier to test plugin logic

Summary:
This diff will make it easier to test a plugin in a "fully loaded" Flipper state. This makes it possible to test all the wiring of flipper, rather than the individual reducers.

This is in preparation of processing the message queue async.

Reviewed By: passy

Differential Revision: D19140879

fbshipit-source-id: 5a333abe9c7a4d0c33d1d06a105cd094cb8fc19f
This commit is contained in:
Michel Weststrate
2019-12-17 06:01:20 -08:00
committed by Facebook Github Bot
parent 5d17eede85
commit 91d5b95341
4 changed files with 234 additions and 1 deletions

View File

@@ -207,7 +207,7 @@ export default class Client extends EventEmitter {
const client = this;
// node.js doesn't support requestIdleCallback
this.rIC =
typeof window === 'undefined'
typeof window === 'undefined' || !window.requestIdleCallback
? (cb: Function, _: any) => {
cb();
}