-
-
Notifications
You must be signed in to change notification settings - Fork 12
feat: add VS Code extension #545
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for rstest-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
161c11a
to
b4bf225
Compare
ad431f5
to
8261603
Compare
5f77bda
to
a428677
Compare
docs: add Repository Guidelines in AGENTS.md test-run: iterate all test results and map to corresponding TestItems for TestCase runs (remove testResults[0] usage) fixed refactor(extension): delegate TestCase/TestFile run logic to testTree classes without changing behavior\n\n- Add gatherTestItems helper to testTree.ts\n- Implement TestFile.run mirroring file-level run logic\n- Implement TestCase.run mirroring case-level run logic\n- Replace duplicated branches in extension.ts with class method calls test(e2e): update expected label tree for fixtures/test/foo.test.ts changes (l1/l2/l3 structure and additional cases) feat: inform user continuous run is not implemented and no-op on watch requests feat(discovery): support common test patterns (*.test.*, *.spec.*)\n\n- Watch and discover **/*.test.* and **/*.spec.*\n- Update open/change handler to process files matching these patterns\n- Keep behavior unchanged otherwise feat(vscode): eagerly scan all test files on init to populate test tree - Add scanAllTestFiles() in src/testTree.ts to find **/*.test.* and **/*.spec.* across workspace, create root TestItems, and parse contents to build children. - Invoke scanAllTestFiles() in extension constructor and on root resolve to ensure the TestController includes all tests without opening files. - Keep existing FS watchers for incremental updates. 1 add config test bundle the extension publish 11 refactor: share test discovery utils a1 publish
e8f1afe
to
803328d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a VS Code extension for Rstest that provides an integrated testing experience within the VS Code environment. The extension discovers test files, builds a hierarchical test tree, and enables running tests directly from the VS Code Test Explorer.
- Implements a complete VS Code extension with test discovery, parsing, and execution capabilities
- Adds comprehensive E2E and unit tests to validate extension functionality
- Integrates the extension into the CI/CD pipeline with automated testing and publishing workflows
Reviewed Changes
Copilot reviewed 58 out of 62 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
packages/vscode/src/extension.ts | Main extension entry point with TestController setup and test discovery |
packages/vscode/src/testTree.ts | Test tree management and result processing logic |
packages/vscode/src/parserTest.ts | SWC-based parser for extracting test structure from source files |
packages/vscode/src/master.ts | Worker process management and communication via WebSocket |
packages/vscode/src/worker/index.ts | Worker process that executes tests using rstest core |
packages/vscode/tests/suite/index.test.ts | E2E tests validating extension functionality |
packages/vscode/package.json | Extension manifest with configuration and dependencies |
.github/workflows/release.yml | CI workflow for publishing extension to VS Code Marketplace |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Summary
just finished the very rough PoC, much work to do to finish this PR. i think the extension it's good to be developed by AI after the PoC and test workflow is finished.
manually test in Rsbuild and Rslib projects.
iShot_2025-09-04_16.06.42.mp4
Related Links
Checklist