Skip to content

Conversation

@alexr00
Copy link
Member

@alexr00 alexr00 commented May 16, 2025

No description provided.

@alexr00 alexr00 requested a review from hediet May 16, 2025 08:53
@alexr00 alexr00 self-assigned this May 16, 2025
@alexr00 alexr00 enabled auto-merge (squash) May 16, 2025 08:53
@vs-code-engineering vs-code-engineering bot added this to the May 2025 milestone May 16, 2025
@alexr00 alexr00 requested review from Copilot and removed request for hediet December 12, 2025 17:28
@alexr00 alexr00 requested review from Copilot and removed request for Copilot December 12, 2025 17:31
Copy link
Contributor

Copilot AI left a 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 comprehensive API tests for the tree-sitter integration in VS Code's workbench. The tests verify core tree-sitter functionality including parsing, tree editing, progress callbacks, and change detection.

Key Changes:

  • Implements test suite for tree-sitter parser API functionality
  • Tests parsing with progress callbacks and tree modification behaviors
  • Validates change range detection across various editing scenarios

modifiedTreeTwo?.delete();
});

test('Test getChangedRanges 3 - ranges are not as expected because the syntax doesn\'t change', async () => {
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

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

Corrected spelling of 'doesn't' to 'doesn't' (proper apostrophe character).

Copilot uses AI. Check for mistakes.

// Add some backticks
const offsetRanges = [new OffsetRange(153, 153), new OffsetRange(271, 271)];
const replacements = [new StringReplacement(offsetRanges[0], 'private x =`'), new StringReplacement(offsetRanges[1], '`')];
Copy link

Copilot AI Dec 12, 2025

Choose a reason for hiding this comment

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

The string 'private x =' has a missing space before the backtick which may be intentional for the test but appears inconsistent. Consider using 'private x = ' with a space before the backtick for better readability, unless the missing space is specifically required for the test case.

Suggested change
const replacements = [new StringReplacement(offsetRanges[0], 'private x =`'), new StringReplacement(offsetRanges[1], '`')];
const replacements = [new StringReplacement(offsetRanges[0], 'private x = `'), new StringReplacement(offsetRanges[1], '`')];

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants