Skip to content

Conversation

@ematipico
Copy link
Member

@ematipico ematipico commented Oct 23, 2025

Summary

Updated the expectations of the test.

Test Plan

The test should pass (there are other three that fail, but unrelated to this one)

Docs

@changeset-bot
Copy link

changeset-bot bot commented Oct 23, 2025

⚠️ No Changeset found

Latest commit: d63a0eb

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the A-LSP Area: language server protocol label Oct 23, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 23, 2025

Walkthrough

Updated tests and doctests across crates: in biome_lsp tests increased an await_notification sleep from 200ms to 1000ms, added #[ignore] to several tests, and adjusted the expected doctype line in one astro fix test. In biome_service tests snapshots were updated to include a new advice_offset: None field on ParseDiagnostic. Doc-tests in biome_formatter and biome_formatter_test were updated to reference fully-qualified types (biome_formatter::LineEnding, updated imports and code block flags). No control-flow or error-handling changes.

Suggested labels

A-Diagnostic

Suggested reviewers

  • siketyan

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "chore: fix LSP astro test" directly corresponds to the primary change in the PR: updating the test expectation in the should_correctly_fix_all_astro_files test within the LSP server tests file. While the changeset includes several supporting modifications (increased async sleep duration, ignored watcher tests, and documentation updates), the title accurately captures the main intent of the fix and remains concise and clear. The title is specific enough that a teammate reviewing the git history would understand the primary focus.
Description Check ✅ Passed The PR description is directly related to the changeset. It states "Updated the expectations of the test," which matches the primary change of updating test expectations in the astro test file. The description further acknowledges that other tests are failing but unrelated to this change, which aligns with the #[ignore] additions visible in the LSP tests file. Although minimal, the description provides sufficient context tied to the actual changes being made.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/fix-lsp-test-astro

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the A-Project Area: project label Oct 23, 2025
@ematipico
Copy link
Member Author

@siketyan if that's ok with you, I ignored the watcher tests that aren't passing. I get the feeling that it will take a while to fix them

@siketyan
Copy link
Member

@ematipico I don't mind disabling them temporarily, but I think it's worth testing the watcher as it heavily relies on OS, so I'll try enabling them later

@github-actions github-actions bot added the A-Formatter Area: formatter label Oct 23, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
crates/biome_formatter_test/src/spec.rs (1)

234-239: Documentation example updated appropriately.

The change to rs,ignore makes sense given the generic constraints, and using the fully-qualified biome_formatter_test::spec::SpecSnapshot path helps external users.

Minor nit: Line 236 still uses crate::TestFormatLanguage whilst line 235 now uses the external path – for consistency you might consider biome_formatter_test::TestFormatLanguage, though it's harmless since the block is ignored.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 33556c4 and d63a0eb.

📒 Files selected for processing (1)
  • crates/biome_formatter_test/src/spec.rs (1 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
crates/biome_*/**

📄 CodeRabbit inference engine (CLAUDE.md)

Place core crates under /crates/biome_*/

Files:

  • crates/biome_formatter_test/src/spec.rs
**/*.rs

📄 CodeRabbit inference engine (CONTRIBUTING.md)

**/*.rs: Format Rust files before committing (e.g., via just f which formats Rust)
Document rules, assists, and options with inline rustdoc in source

Files:

  • crates/biome_formatter_test/src/spec.rs
🧠 Learnings (9)
📓 Common learnings
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_service/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:25:05.698Z
Learning: Applies to crates/biome_service/../biome_lsp/src/server.tests.rs : Keep end-to-end LSP tests in ../biome_lsp/src/server.tests.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_test.rs : Implement a `run` function in tests/spec_test.rs that wires SpecSnapshot and includes!("language.rs") as shown

Applied to files:

  • crates/biome_formatter_test/src/spec.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/spec_tests.rs : In tests/spec_tests.rs, generate tests with `tests_macros::gen_tests! {"tests/specs/html/**/*.html", crate::spec_test::run, ""}`

Applied to files:

  • crates/biome_formatter_test/src/spec.rs
📚 Learning: 2025-10-15T09:20:19.139Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.139Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : Mark code blocks in documentation with a language and required properties (e.g., expect_diagnostic for invalid snippets; options/full_options/use_options as needed). Each invalid snippet must emit exactly one diagnostic

Applied to files:

  • crates/biome_formatter_test/src/spec.rs
📚 Learning: 2025-10-15T09:20:19.139Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_analyze/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:20:19.139Z
Learning: Applies to crates/biome_analyze/**/lib/src/{lint,assist}/**/*.rs : When documenting multi-file examples, use file=<path> in code block properties; keep modifier order consistent: language[,expect_diagnostic][,(options|full_options|use_options)][,ignore][,file=path]

Applied to files:

  • crates/biome_formatter_test/src/spec.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/src/**/*.rs : After generation, remove usages of `format_verbatim_node` and implement real formatting with biome_formatter utilities

Applied to files:

  • crates/biome_formatter_test/src/spec.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/** : Create a tests directory containing a specs subfolder and the files spec_test.rs, spec_tests.rs, and language.rs

Applied to files:

  • crates/biome_formatter_test/src/spec.rs
📚 Learning: 2025-10-15T09:22:15.851Z
Learnt from: CR
PR: biomejs/biome#0
File: crates/biome_formatter/CONTRIBUTING.md:0-0
Timestamp: 2025-10-15T09:22:15.851Z
Learning: Applies to crates/biome_formatter/tests/language.rs : Create tests/language.rs defining `HtmlTestFormatLanguage` and implement the TestFormatLanguage trait

Applied to files:

  • crates/biome_formatter_test/src/spec.rs
📚 Learning: 2025-08-17T08:55:30.118Z
Learnt from: CR
PR: biomejs/biome#0
File: CLAUDE.md:0-0
Timestamp: 2025-08-17T08:55:30.118Z
Learning: Applies to **/tests/specs/**/*.snap : Use snapshot spec tests stored as .snap files under tests/specs/ (via cargo insta)

Applied to files:

  • crates/biome_formatter_test/src/spec.rs
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (9)
  • GitHub Check: Documentation
  • GitHub Check: Check Dependencies
  • GitHub Check: End-to-end tests
  • GitHub Check: Lint project (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-ubuntu-24.04-arm-16)
  • GitHub Check: Test (depot-windows-2022-16)
  • GitHub Check: Lint project (depot-windows-2022)
  • GitHub Check: Test Node.js API
  • GitHub Check: autofix

@ematipico ematipico merged commit 50da84e into main Oct 23, 2025
12 checks passed
@ematipico ematipico deleted the chore/fix-lsp-test-astro branch October 23, 2025 15:48
Jagget pushed a commit to Jagget/biome that referenced this pull request Oct 27, 2025
Conaclos pushed a commit that referenced this pull request Nov 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Formatter Area: formatter A-LSP Area: language server protocol A-Project Area: project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants