Drive-by: fix electron issues, exposed by the test using
waitForNavigation.
Drive-by: mark some tests skip(CHANNEL) that were mistakenly
marked skip(USES_HOOKS).
This includes page CDPSession, backgroundPages() and serviceWorkers().
This has also revealed an issue with closing order between the context
and the service worker.
I enabled vscode autocomplete in our test files. Typechecking had too many errors to enable, but it caught some real bugs that I will fix in a follow up.
This patch contains:
* `test/types.d.ts` - d.ts file for our test runner.
* `test/tsconfig.json` - typescript project for our tests.
* JSDoc header in all specs to mark the describe as a TestSuite
* Drive-by fix of a launcher test that was using `if` instead of `it`
* Some drive-by fixes of unimpactful typos in tests.