✅ test: add test suites for mq-web, mq-playground, and vscode extension#1986
Merged
Conversation
Also upgrade typescript to v7 (^7.0.2) across mq-web, mq-nodejs, mq-playground, and editors/vscode. mq-web, mq-playground, and the vscode extension had zero test coverage, so add it while verifying the upgrade: - mq-web: vitest suite mirroring mq-nodejs's API tests, using a fetch shim so the wasm-pack "web" target binary loads under Node. - mq-playground: vitest + React Testing Library covering device detection, the OPFS file system wrapper, ConfirmDialog, and Toast. - editors/vscode: wire up the previously-unused @vscode/test-cli / @vscode/test-electron scaffolding into a working integration harness that runs against a real VS Code Extension Host. - mq-playground/pnpm-workspace.yaml: exclude typescript/@typescript/* from the 3-day minimumReleaseAge policy so 7.0.2 can install.
Command IDs were duplicated between package.json's contributes.commands and the extension test's hardcoded EXPECTED_COMMANDS array, so adding a new command without registering it (or vice versa) could go unnoticed. Read the declared commands from the extension's packageJSON at runtime instead, keeping only the 4 commands intentionally left out of contributes.commands (status-bar-only, not in the Command Palette) as an explicit list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Also upgrade typescript to v7 (^7.0.2) across mq-web, mq-nodejs, mq-playground, and editors/vscode. mq-web, mq-playground, and the vscode extension had zero test coverage, so add it while verifying the upgrade:
Type of Change
Checklist
cargo fmtandcargo clippyand addressed any warningsjust test-alland all tests pass/docs, crateREADME.md) if neededAdditional Context