Chore: Fix vscode test, add basic vitest, clean-up package tasks
-
Added basic unit testing via Vitest
-
Fixed VSCode testing
-
Previously, tests were not running. Updated the configuration to point to a new directory for segmenting VSCode-specific tests.
-
Updated the tsconfig to output CommonJS:
-
The extension is built with esbuild, so this change does not affect the extension build process.
-
This is necessary because VSCode needs to load the extension and execute the test JavaScript code. The solution is to build to CommonJS in the out directory, allowing VSCode to load the VSIX extension and then call the test JavaScript code in out.
-
-
Added some very basic tests to verify that the extension loads and works. These can obviously be expanded later.
-
-
Added a CI workflow to GitHub Actions to run the basic test suite on PRs and the main branch. (See this in action here - Runs in around 30s.)
- CI runs linting, formatting and testing on every push to main or on PRs targeting main.
TODO: WebUI tests are not running yet; this is likely better suited for a separate PR.
@saoudrizwan I simplified this down to be a pretty basic sanity test, plus a small example test. The only additional package in 'vitest', but I'm open to alternatives
Thank you Mark! 🙏