Add unit tests for code_intelligence
Created by: lguychard
Adds a first set of jsdom-based tests for handleCodeHost()
, testing the basic functionality of the browser extension (inject command palette, inject global debug palette, detect code views, decorate code views).
To allow this, some refactoring was done so that the extension controller and platform context can be injected in handleCodeHost()
. showGlobalDebug
is now also injected, instead of directly accessing localStorage in GlobalDebug.tsx
.
This is just a starting point, these tests are not exhaustive.