Skip to content

test(napi/parser): fix tests for range, parent, and lazy on TS fixtures#19884

Merged
graphite-app[bot] merged 1 commit intomainfrom
om/03-01-test_napi_parser_fix_tests_for_range_parent_and_lazy_on_ts_fixtures
Mar 1, 2026
Merged

test(napi/parser): fix tests for range, parent, and lazy on TS fixtures#19884
graphite-app[bot] merged 1 commit intomainfrom
om/03-01-test_napi_parser_fix_tests_for_range_parent_and_lazy_on_ts_fixtures

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Mar 1, 2026

napi/parser's tests for raw transfer ranges, parents, and lazy deserialization were incorrect. They were testing parsing the entire TS fixture file, which can contain multiple parts, instead of testing each part individually. Fix that.

Copy link
Member Author

overlookmotel commented Mar 1, 2026


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.

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

Updates napi/parser TypeScript fixture tests so range/parent validation and experimentalLazy deserialization are exercised per TS fixture part (unit) rather than against the entire fixture file, aligning these tests with how AST snapshot comparisons already work.

Changes:

  • In runTsCase, pass the per-unit code to testRangeParent instead of the full sourceText.
  • In runTsCase, pass the per-unit code to testLazy instead of the full sourceText.

@overlookmotel overlookmotel self-assigned this Mar 1, 2026
@overlookmotel overlookmotel force-pushed the om/03-01-test_napi_parser_fix_tests_for_range_parent_and_lazy_on_ts_fixtures branch from 3d9f043 to f68d533 Compare March 1, 2026 17:27
@overlookmotel overlookmotel force-pushed the om/03-01-refactor_estree_tokens_convert_token_kinds_to_estreekind_ branch from fe2d845 to cd255b5 Compare March 1, 2026 17:27
@overlookmotel overlookmotel added the 0-merge Merge with Graphite Merge Queue label Mar 1, 2026
Copy link
Member Author

overlookmotel commented Mar 1, 2026

Merge activity

@overlookmotel overlookmotel force-pushed the om/03-01-refactor_estree_tokens_convert_token_kinds_to_estreekind_ branch from cd255b5 to f53737d Compare March 1, 2026 17:29
@overlookmotel overlookmotel force-pushed the om/03-01-test_napi_parser_fix_tests_for_range_parent_and_lazy_on_ts_fixtures branch from f68d533 to daaf50f Compare March 1, 2026 17:29
…es (#19884)

`napi/parser`'s tests for raw transfer ranges, parents, and lazy deserialization were incorrect. They were testing parsing the entire TS fixture file, which can contain multiple parts, instead of testing each part individually. Fix that.
@graphite-app graphite-app bot force-pushed the om/03-01-refactor_estree_tokens_convert_token_kinds_to_estreekind_ branch from f53737d to 449080c Compare March 1, 2026 17:41
@graphite-app graphite-app bot force-pushed the om/03-01-test_napi_parser_fix_tests_for_range_parent_and_lazy_on_ts_fixtures branch from daaf50f to 8b89309 Compare March 1, 2026 17:41
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Mar 1, 2026
Base automatically changed from om/03-01-refactor_estree_tokens_convert_token_kinds_to_estreekind_ to main March 1, 2026 17:48
@graphite-app graphite-app bot merged commit 8b89309 into main Mar 1, 2026
20 checks passed
@graphite-app graphite-app bot deleted the om/03-01-test_napi_parser_fix_tests_for_range_parent_and_lazy_on_ts_fixtures branch March 1, 2026 17:50
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