Skip to content

Conversation

@lilnasy
Copy link
Contributor

@lilnasy lilnasy commented Nov 24, 2025

@github-actions github-actions bot added A-linter Area - Linter A-cli Area - CLI C-test Category - Testing. Code is missing test cases, or a PR is adding them labels Nov 24, 2025
@lilnasy lilnasy marked this pull request as ready for review November 24, 2025 10:46
@lilnasy lilnasy requested a review from camc314 as a code owner November 24, 2025 10:46
Copilot AI review requested due to automatic review settings November 24, 2025 10:46
Copilot finished reviewing on behalf of lilnasy November 24, 2025 10:48
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 test cases for the getFirstToken() and getTokenAfter() functions, implementing previously stubbed test cases. These tests verify that tokens and comments can be correctly retrieved from parsed source code, both with and without whitespace.

Key Changes

  • Replaced placeholder test with two functional test cases that verify token retrieval behavior
  • Tests validate token iteration with includeComments: true option on different source text formats

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lilnasy lilnasy force-pushed the test/linter/token-methods/getFirstToken-getTokenAfter branch from 58c8bdf to 359e5cc Compare November 24, 2025 10:50
@lilnasy lilnasy changed the title test(linter/plugins): cases for getFirstToken() and getTokenAfter test(linter/plugins): cases for SourceCode#getFirstToken() and SourceCode#getTokenAfter() Nov 24, 2025
@lilnasy lilnasy force-pushed the test/linter/token-methods/getFirstToken-getTokenAfter branch from 359e5cc to b7a1ed5 Compare November 24, 2025 10:59
@overlookmotel overlookmotel self-assigned this Nov 24, 2025
@overlookmotel overlookmotel force-pushed the test/linter/token-methods/getFirstToken-getTokenAfter branch from b7a1ed5 to 710fcc7 Compare November 24, 2025 17:20
@overlookmotel overlookmotel merged commit a9cf44a into oxc-project:main Nov 24, 2025
17 checks passed
@lilnasy lilnasy deleted the test/linter/token-methods/getFirstToken-getTokenAfter branch November 24, 2025 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area - CLI A-linter Area - Linter C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants