mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-27 00:08:42 +00:00
original uri https://github.com/zed-industries/zed
https://zed.dev
Closed #33759 Closed #38166 ### Summary This PR fixes the way `go test` commands are generated for **testify suite test methods**. Previously, only the method name was included in the `-run` flag, which caused Go’s test runner to fail to find suite test cases. --- ### Problem https://github.com/user-attachments/assets/e6f80a77-bcf3-457c-8bfb-a7286d44ff71 1. **Incorrect command** was generated for suite tests: ```bash go test -run TestSomething_Success ``` This results in: ``` testing: warning: no tests to run ``` 2. The correct format requires the **suite name + method name**: ```bash go test -run ^TestFooSuite$/TestSomething_Success$ ``` Without the suite prefix (`TestFooSuite`), Go cannot locate test methods defined on a suite struct. --- ### Changes Made * **Updated `runnables.scm`**: * Added a new query rule for suite methods (`.*Suite` receiver types). * Ensures only methods on suite structs (e.g., `FooSuite`) are matched. * Tagged these with `go-testify-suite` in addition to `go-test`. * **Extended task template generation**: * Introduced `GO_SUITE_NAME_TASK_VARIABLE` to capture the suite name. * Create a `TaskTemplate` for the testify suite. * **Improved labeling**: * Labels now show the full path (`go test ./pkg -v -run TestFooSuite/TestSomething_Success`) for clarity. * **Added a test** `test_testify_suite_detection`: * Covered testify suite cases to ensure correct detection and command generation. --- ### Impact https://github.com/user-attachments/assets/ef509183-534a-4aa4-9dc7-01402ac32260 * **Before**: Running a suite test method produced “no tests to run.” * **After**: Suite test methods are runnable individually with the correct `-run` command, and full suites can still be executed as before. ### Release Notes * Fixed generation of `go test` commands for **testify suite test methods**. Suite methods now include both the suite name and the method name in the `-run` flag (e.g., `^TestFooSuite$/TestSomething_Success$`), ensuring they are properly detected and runnable individually. |
||
|---|---|---|
| .cargo | ||
| .cloudflare | ||
| .config | ||
| .github | ||
| .zed | ||
| assets | ||
| crates | ||
| docs | ||
| extensions | ||
| legal | ||
| nix | ||
| script | ||
| tooling | ||
| .clinerules | ||
| .cursorrules | ||
| .git-blame-ignore-revs | ||
| .gitattributes | ||
| .gitignore | ||
| .mailmap | ||
| .prettierrc | ||
| .rules | ||
| .windsurfrules | ||
| Cargo.lock | ||
| Cargo.toml | ||
| CLAUDE.md | ||
| clippy.toml | ||
| CODE_OF_CONDUCT.md | ||
| compose.yml | ||
| CONTRIBUTING.md | ||
| Cross.toml | ||
| debug.plist | ||
| default.nix | ||
| docker-compose.sql | ||
| Dockerfile-collab | ||
| Dockerfile-collab.dockerignore | ||
| Dockerfile-cross | ||
| Dockerfile-cross.dockerignore | ||
| Dockerfile-distros | ||
| Dockerfile-distros.dockerignore | ||
| flake.lock | ||
| flake.nix | ||
| LICENSE-AGPL | ||
| LICENSE-APACHE | ||
| LICENSE-GPL | ||
| livekit.yaml | ||
| lychee.toml | ||
| Procfile | ||
| Procfile.postgrest | ||
| Procfile.web | ||
| README.md | ||
| renovate.json | ||
| rust-toolchain.toml | ||
| shell.nix | ||
| typos.toml | ||
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS and Linux you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Windows (tracking issue)
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.