Skip to content

test(parser): combine test cases for let as identifier#16861

Merged
graphite-app[bot] merged 1 commit intomainfrom
12-14-test_parser_combine_test_cases_for_let_as_identifier
Dec 14, 2025
Merged

test(parser): combine test cases for let as identifier#16861
graphite-app[bot] merged 1 commit intomainfrom
12-14-test_parser_combine_test_cases_for_let_as_identifier

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Dec 14, 2025

Follow-on after #16840 and #16857. We had a few test cases relating to the same thing, and one of them called the undescriptive oxc.js. Combine them, and rename the test case files with a more accurate name.

@github-actions github-actions bot added the C-test Category - Testing. Code is missing test cases, or a PR is adding them label Dec 14, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@overlookmotel overlookmotel marked this pull request as ready for review December 14, 2025 21:22
Copilot AI review requested due to automatic review settings December 14, 2025 21:22
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.

Copilot wasn't able to review any files in this pull request.


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

@overlookmotel overlookmotel added the A-parser Area - Parser label Dec 14, 2025
@overlookmotel overlookmotel self-assigned this Dec 14, 2025
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Dec 14, 2025
Copy link
Member Author

overlookmotel commented Dec 14, 2025

Merge activity

Copy link

@charliecreates charliecreates bot left a comment

Choose a reason for hiding this comment

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

The consolidation looks correct and the snapshot updates are consistent with the file moves, but the new fixture names/comments are now slightly misleading because they bundle optional chaining cases under “member expression”. Consider renaming or splitting to keep fixtures narrowly scoped and easier to maintain/search.

Additional notes (3)
  • Maintainability | tasks/coverage/misc/fail/let-member-expression.js:1-12
    The file comment says it tests member/call expressions, but it also includes several optional chaining cases. That’s fine functionally, but it makes the fixture name/comment slightly misleading and harder to grep later when someone is looking specifically for optional chaining behavior.

Consider either splitting optional chaining back out or renaming/commenting the fixture to reflect both concerns (e.g., member/call and optional chaining) so future changes don’t accidentally drop coverage.

  • Maintainability | tasks/coverage/misc/fail/let-member-expression.js:1-3
    'use strict'; is redundant in a file that is explicitly described as a module fixture, since ES modules are always strict mode. If the harness treats .js in misc/fail as a module via sourceType: "module", this line is noise and can slightly obscure what is being tested (reserved-word parsing vs. strictness). If, however, the harness relies on 'use strict' to force strictness for .js inputs, the comment should say that explicitly to avoid future confusion.

  • Maintainability | tasks/coverage/misc/pass/let-member-expression.cjs:1-10
    In the passing .cjs fixture, the comment says “in script”, but the file also contains optional chaining. Depending on what this coverage suite is intended to assert, optional chaining may require a minimum language version/feature flag in some parsers.

If the test runner’s configuration ever varies (e.g., running with older ECMAScript targets), this fixture could become an accidental coupling between “script vs module let identifier rules” and “optional chaining enabled”.

Summary of changes

What changed

This PR consolidates and renames parser coverage fixtures around using the reserved keyword let as an identifier in member/call expressions.

  • New negative fixture: tasks/coverage/misc/fail/let-member-expression.js
    • Combines prior failing cases from let-optional-chaining.js and oxc.js into one module/strict-mode fixture.
  • New positive fixture: tasks/coverage/misc/pass/let-member-expression.cjs
    • Consolidates prior passing optional chaining script fixture into a single .cjs script fixture.
  • Removed redundant/unclear fixtures:
    • Deleted tasks/coverage/misc/fail/let-optional-chaining.js
    • Deleted tasks/coverage/misc/fail/oxc.js (previously non-descriptive)
    • Deleted tasks/coverage/misc/pass/let-optional-chaining.cjs
  • Snapshot update: tasks/coverage/snapshots/parser_misc.snap
    • Updates counts (Negative Passed: 122/122121/121) and rewires expected error locations to the new consolidated file/line numbers.

@charliecreates charliecreates bot removed the request for review from CharlieHelps December 14, 2025 21:29
Follow-on after #16840 and #16857. We had a few test cases relating to the same thing, and one of them called the undescriptive `oxc.js`. Combine them, and rename the test case files with a more accurate name.
@graphite-app graphite-app bot force-pushed the 12-14-test_parser_combine_test_cases_for_let_as_identifier branch from e4d389c to 75f9800 Compare December 14, 2025 21:30
@graphite-app graphite-app bot merged commit 75f9800 into main Dec 14, 2025
18 checks passed
@graphite-app graphite-app bot deleted the 12-14-test_parser_combine_test_cases_for_let_as_identifier branch December 14, 2025 21:36
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Dec 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-parser Area - Parser 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