Summary:
Non-final identifiers make code harder to understand.
This is particularly true for JavaScript where even the *type*
can change as a value gets reassigned later.
This enforces to use `const` whereever possible, but doesn't
"outlaw" `let`. Mixed destructuring is also still allowed.
Used `eslint --fix` to change all existing cases.
Reviewed By: jknoxville
Differential Revision: D16131329
fbshipit-source-id: 2eceaca7c603b71b36e005be5d135e1849f2518d
Summary:
We were using `window.performance` to measure performance. This was because the equivalent node.js API `perf_hooks` wasn't available in the electron version we were using back then.
However, `perf_hooks` has landed in electron meanwhile, so I am moving to this API, as it works for the headless version and jest tests, too.
This allows us to delete the babel transform that was used for node-based tests, where the browser API was replaced with the node API
Reviewed By: jknoxville
Differential Revision: D13860133
fbshipit-source-id: cf1395004fac046dd55751ff465af494173b2cbf
Summary:
I tried switching Flipper to use the node.js module: https://nodejs.org/api/perf_hooks.html instead of electrons window.performance. But the module couldn't be found.
So instead, I'm just replacing it in the pure node tests.
This means tests without node can work without issues.
Reviewed By: danielbuechele
Differential Revision: D10302114
fbshipit-source-id: b3b8aa5fb350a8246fcdfc2a80cc72daec2448d7
Summary:
The idea behind this is to enable tests running in pure node, without electron, because electron requires display drivers and complicated things.
I've been lazy and only added the bare minimum electron api's for the connection test to pass.
It would be awesome to auto generate it properly.
Reviewed By: danielbuechele
Differential Revision: D10238132
fbshipit-source-id: d4a2da2baf5f8964184b532a581c3a75ee33ef06